| 1 |
// REQUIRES: asserts |
| 2 |
// RUN: %clang_cc1 -O0 -triple %itanium_abi_triple -debug-info-kind=limited -emit-llvm %s -o - | \ |
| 3 |
// RUN: FileCheck %s |
| 4 |
|
| 5 |
// Trigger GenerateVarArgsThunk. |
| 6 |
// RUN: %clang_cc1 -O0 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \ |
| 7 |
// RUN: FileCheck %s |
| 8 |
|
| 9 |
// Check that retainedNodes are properly maintained at function cloning. |
| 10 |
// RUN: %clang_cc1 -O1 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \ |
| 11 |
// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DI |
| 12 |
|
| 13 |
// This test simply checks that the varargs thunk is created. The failing test |
| 14 |
// case asserts. |
| 15 |
|
| 16 |
typedef signed char __int8_t; |
| 17 |
typedef int BOOL; |
| 18 |
class CMsgAgent; |
| 19 |
|
| 20 |
class CFs { |
| 21 |
public: |
| 22 |
typedef enum {} CACHE_HINT; |
| 23 |
virtual BOOL ReqCacheHint( CMsgAgent* p_ma, CACHE_HINT hint, ... ) ; |
| 24 |
}; |
| 25 |
|
| 26 |
typedef struct {} _Lldiv_t; |
| 27 |
|
| 28 |
class CBdVfs { |
| 29 |
public: |
| 30 |
virtual ~CBdVfs( ) {} |
| 31 |
}; |
| 32 |
|
| 33 |
class CBdVfsImpl : public CBdVfs, public CFs { |
| 34 |
BOOL ReqCacheHint( CMsgAgent* p_ma, CACHE_HINT hint, ... ); |
| 35 |
}; |
| 36 |
|
| 37 |
BOOL CBdVfsImpl::ReqCacheHint( CMsgAgent* p_ma, CACHE_HINT hint, ... ) { |
| 38 |
return true; |
| 39 |
} |
| 40 |
|
| 41 |
// CHECK: define {{.*}} @_ZThn{{[48]}}_N10CBdVfsImpl12ReqCacheHintEP9CMsgAgentN3CFs10CACHE_HINTEz( |
| 42 |
|
| 43 |
// An empty retainedNodes list of cloned DISubprogram. |
| 44 |
// CHECK-DI: [[EMPTY:![0-9]+]] = !{} |
| 45 |
// CHECK-DI: distinct !DISubprogram({{.*}}, linkageName: "_ZN10CBdVfsImpl12ReqCacheHintEP9CMsgAgentN3CFs10CACHE_HINTEz", {{.*}}, retainedNodes: [[RN1:![0-9]+]] |
| 46 |
// A non-empty retainedNodes list of original DISubprogram. |
| 47 |
// CHECK-DI: [[RN1]] = !{!{{.*}}} |
| 48 |
|
| 49 |
// CHECK-DI: distinct !DISubprogram({{.*}}, linkageName: "_ZN10CBdVfsImpl12ReqCacheHintEP9CMsgAgentN3CFs10CACHE_HINTEz", {{.*}}, retainedNodes: [[EMPTY]] |