diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-12-16 04:26:15 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-12-16 04:26:15 +0000 |
commit | db4c86f953f139eaa75acdd58d5213be2f6fe65b (patch) | |
tree | 58051eff96dacd5d6979c5dccc86414048fec4a6 /clang/test | |
parent | 74a835cda0b0ad6cc58cbecdec1def780b3a4264 (diff) | |
download | bcm5719-llvm-db4c86f953f139eaa75acdd58d5213be2f6fe65b.tar.gz bcm5719-llvm-db4c86f953f139eaa75acdd58d5213be2f6fe65b.zip |
Update for LLVM global variable debug info API change.
llvm-svn: 289921
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/2009-10-20-GlobalDebug.c | 14 | ||||
-rw-r--r-- | clang/test/CodeGen/2010-08-10-DbgConstant.c | 2 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-atomic.c | 9 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-global-constant.c | 4 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-static-const-fp.c | 30 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-static.c | 3 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-global.cpp | 5 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-static-member.cpp | 11 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-template-member.cpp | 5 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-template.cpp | 15 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info.cpp | 5 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/inline-dllexport-member.cpp | 3 |
12 files changed, 65 insertions, 41 deletions
diff --git a/clang/test/CodeGen/2009-10-20-GlobalDebug.c b/clang/test/CodeGen/2009-10-20-GlobalDebug.c index 38f20cdb6b0..0d7c759f905 100644 --- a/clang/test/CodeGen/2009-10-20-GlobalDebug.c +++ b/clang/test/CodeGen/2009-10-20-GlobalDebug.c @@ -10,9 +10,11 @@ int main() { return 0; } -// CHECK: [[L]] = distinct !DIGlobalVariable(name: "localstatic" -// CHECK-NOT: linkageName: -// CHECK-SAME: line: 9, -// CHECK: [[G]] = distinct !DIGlobalVariable(name: "global" -// CHECK-NOT: linkageName: -// CHECK-SAME: line: 7, +// CHECK: [[L]] = !DIGlobalVariableExpression(var: [[LV:.*]]) +// CHECK: [[LV]] = distinct !DIGlobalVariable(name: "localstatic" +// CHECK-NOT: linkageName: +// CHECK-SAME: line: 9, +// CHECK: [[G]] = !DIGlobalVariableExpression(var: [[GV:.*]]) +// CHECK: [[GV]] = distinct !DIGlobalVariable(name: "global" +// CHECK-NOT: linkageName: +// CHECK-SAME: line: 7, diff --git a/clang/test/CodeGen/2010-08-10-DbgConstant.c b/clang/test/CodeGen/2010-08-10-DbgConstant.c index 3a40c240bea..68947edd526 100644 --- a/clang/test/CodeGen/2010-08-10-DbgConstant.c +++ b/clang/test/CodeGen/2010-08-10-DbgConstant.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s -// CHECK: !DIGlobalVariable({{.*}}, expr: [[EXPR:![0-9]+]]) +// CHECK: !DIGlobalVariableExpression(var: [[VAR:.*]], expr: [[EXPR:![0-9]+]]) // CHECK: [[EXPR]] = !DIExpression(DW_OP_constu, 201, DW_OP_stack_value) static const unsigned int ro = 201; diff --git a/clang/test/CodeGen/debug-info-atomic.c b/clang/test/CodeGen/debug-info-atomic.c index 06b9546908c..3de0d3585d2 100644 --- a/clang/test/CodeGen/debug-info-atomic.c +++ b/clang/test/CodeGen/debug-info-atomic.c @@ -1,7 +1,8 @@ // RUN: %clang -g -c -std=c11 -S -emit-llvm -o - %s | FileCheck %s -// CHECK: !DIGlobalVariable(name: "i"{{.*}}type: !5, isLocal: false, isDefinition: true) -// CHECK: !5 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !6) -// CHECK: !6 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !7) -// CHECK: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +// CHECK: !DIGlobalVariable(name: "i" +// CHECK-SAME: type: ![[T:.*]], isLocal: false, isDefinition: true) +// CHECK: ![[T]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[BT:.*]]) +// CHECK: ![[BT]] = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: ![[BTT:.*]]) +// CHECK: ![[BTT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) _Atomic const int i; diff --git a/clang/test/CodeGen/debug-info-global-constant.c b/clang/test/CodeGen/debug-info-global-constant.c index f214fdcd113..4175f24675e 100644 --- a/clang/test/CodeGen/debug-info-global-constant.c +++ b/clang/test/CodeGen/debug-info-global-constant.c @@ -5,8 +5,8 @@ // exactly once. // CHECK: @i = internal constant i32 1, align 4, !dbg ![[I:[0-9]+]] -// CHECK: ![[I]] = distinct !DIGlobalVariable(name: "i", -// CHECK-SAME: expr: ![[EXPR:[0-9]+]] +// CHECK: ![[I]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: ![[EXPR:[0-9]+]]) +// CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "i", // CHECK: !DICompileUnit({{.*}}globals: ![[GLOBALS:[0-9]+]]) // CHECK: ![[GLOBALS]] = !{![[I]]} // CHECK: ![[EXPR]] = !DIExpression(DW_OP_constu, 1, DW_OP_stack_value) diff --git a/clang/test/CodeGen/debug-info-static-const-fp.c b/clang/test/CodeGen/debug-info-static-const-fp.c index 67cda82c5f6..4dfe057f2b6 100644 --- a/clang/test/CodeGen/debug-info-static-const-fp.c +++ b/clang/test/CodeGen/debug-info-static-const-fp.c @@ -33,14 +33,22 @@ int main() { return hVal + fVal + dVal + ldVal; } -// CHECK: !DIGlobalVariable(name: "hVal", {{.*}}, isLocal: true, isDefinition: true, expr: ![[HEXPR:[0-9]+]] -// CHECK: ![[HEXPR]] = !DIExpression(DW_OP_constu, 16502, DW_OP_stack_value) - -// CHECK: !DIGlobalVariable(name: "fVal", {{.*}}, isLocal: true, isDefinition: true, expr: ![[FEXPR:[0-9]+]] -// CHECK: ![[FEXPR]] = !DIExpression(DW_OP_constu, 3238681178, DW_OP_stack_value) - -// CHECK: !DIGlobalVariable(name: "dVal", {{.*}}, isLocal: true, isDefinition: true, expr: ![[DEXPR:[0-9]+]] -// CHECK: ![[DEXPR]] = !DIExpression(DW_OP_constu, 4658387303597904457, DW_OP_stack_value) - -// CHECK-LDlg: !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true) -// CHECK-LDsm: !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true, expr: +// CHECK: !DIGlobalVariableExpression(var: [[HVAL:.*]], expr: [[HEXPR:.*]]) +// CHECK: [[HVAL]] = distinct !DIGlobalVariable(name: "hVal", +// CHECK-SAME: isLocal: true, isDefinition: true +// CHECK: [[HEXPR]] = !DIExpression(DW_OP_constu, 16502, DW_OP_stack_value) + +// CHECK: !DIGlobalVariableExpression(var: [[FVAL:.*]], expr: [[FEXPR:.*]]) +// CHECK: [[FVAL]] = distinct !DIGlobalVariable(name: "fVal", +// CHECK-SAME: isLocal: true, isDefinition: true +// CHECK: [[FEXPR]] = !DIExpression(DW_OP_constu, 3238681178, DW_OP_stack_value) + +// CHECK: !DIGlobalVariableExpression(var: [[DVAL:.*]], expr: [[DEXPR:.*]]) +// CHECK: [[DVAL]] = distinct !DIGlobalVariable(name: "dVal", +// CHECK-SAME: isLocal: true, isDefinition: true +// CHECK: [[DEXPR]] = !DIExpression(DW_OP_constu, 4658387303597904457, DW_OP_stack_value) + +// CHECK-LDlg-DAG: [[LDVAL:.*]] = distinct !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true) +// CHECK-LDlg-DAG: !DIGlobalVariableExpression(var: [[LDVAL]]) +// CHECK-LDsm-DAG: [[LDVAL:.*]] = distinct !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true) +// CHECK-LDsm-DAG: !DIGlobalVariableExpression(var: [[LDVAL]], expr: diff --git a/clang/test/CodeGen/debug-info-static.c b/clang/test/CodeGen/debug-info-static.c index 0ebd6a626d8..016f1e6e6cc 100644 --- a/clang/test/CodeGen/debug-info-static.c +++ b/clang/test/CodeGen/debug-info-static.c @@ -2,7 +2,8 @@ // CHECK: @f.xyzzy = internal global i32 0, align 4, !dbg [[XYZZY:![0-9]+]] -// CHECK: [[XYZZY]] = distinct !DIGlobalVariable +// CHECK: [[XYZZY]] = !DIGlobalVariableExpression(var: [[VAR:.*]]) +// CHECK: [[VAR]] = distinct !DIGlobalVariable void f(void) { static int xyzzy; diff --git a/clang/test/CodeGenCXX/debug-info-global.cpp b/clang/test/CodeGenCXX/debug-info-global.cpp index 795602380d2..5abc050431d 100644 --- a/clang/test/CodeGenCXX/debug-info-global.cpp +++ b/clang/test/CodeGenCXX/debug-info-global.cpp @@ -15,7 +15,8 @@ int f1() { // CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]} -// CHECK: [[CNST]] = distinct !DIGlobalVariable(name: "cnst", -// CHECK-SAME: scope: [[NS:![0-9]*]] +// CHECK: [[CNST]] = !DIGlobalVariableExpression(var: [[CNSTV:.*]], expr: +// CHECK: [[CNSTV]] = distinct !DIGlobalVariable(name: "cnst", +// CHECK-SAME: scope: [[NS:![0-9]*]] // CHECK: [[NS]] = !DINamespace(name: "ns" diff --git a/clang/test/CodeGenCXX/debug-info-static-member.cpp b/clang/test/CodeGenCXX/debug-info-static-member.cpp index d28c2ac865f..c777ccb2aba 100644 --- a/clang/test/CodeGenCXX/debug-info-static-member.cpp +++ b/clang/test/CodeGenCXX/debug-info-static-member.cpp @@ -32,7 +32,9 @@ public: // why the definition of "a" comes before the declarations while // "b" and "c" come after. -// CHECK: [[A]] = distinct !DIGlobalVariable(name: "a", {{.*}} declaration: ![[DECL_A:[0-9]+]]) +// CHECK: [[A]] = !DIGlobalVariableExpression(var: [[AV:.*]]) +// CHECK: [[AV]] = distinct !DIGlobalVariable(name: "a", +// CHECK-SAME: declaration: ![[DECL_A:[0-9]+]]) // // CHECK: !DICompositeType(tag: DW_TAG_enumeration_type, name: "X"{{.*}}, identifier: "_ZTS1X") // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "anon_static_decl_struct" @@ -43,7 +45,9 @@ public: // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var" int C::a = 4; -// CHECK: [[B]] = distinct !DIGlobalVariable(name: "b", {{.*}} declaration: ![[DECL_B:[0-9]+]]) +// CHECK: [[B]] = !DIGlobalVariableExpression(var: [[BV:.*]]) +// CHECK: [[BV]] = distinct !DIGlobalVariable(name: "b", +// CHECK-SAME: declaration: ![[DECL_B:[0-9]+]]) // CHECK: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_member, name: "b" // CHECK-NOT: size: // CHECK-NOT: align: @@ -89,7 +93,8 @@ int C::a = 4; // CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember) int C::b = 2; -// CHECK: [[C]] = distinct !DIGlobalVariable(name: "c", {{.*}} declaration: ![[DECL_C]]) +// CHECK: [[C]] = !DIGlobalVariableExpression(var: [[CV:.*]]) +// CHECK: [[CV]] = distinct !DIGlobalVariable(name: "c", {{.*}} declaration: ![[DECL_C]]) int C::c = 1; int main() diff --git a/clang/test/CodeGenCXX/debug-info-template-member.cpp b/clang/test/CodeGenCXX/debug-info-template-member.cpp index 749b92e93ba..2b840745ffe 100644 --- a/clang/test/CodeGenCXX/debug-info-template-member.cpp +++ b/clang/test/CodeGenCXX/debug-info-template-member.cpp @@ -19,8 +19,9 @@ inline int add3(int x) { } // The compile unit pulls in the global variables first. -// CHECK: [[X]] = distinct !DIGlobalVariable(name: "x", -// CHECK-SAME: type: ![[OUTER_FOO_INNER_ID:[0-9]+]] +// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:.*]]) +// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x", +// CHECK-SAME: type: ![[OUTER_FOO_INNER_ID:[0-9]+]] // CHECK: ![[OUTER_FOO_INNER_ID:[0-9]*]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "inner"{{.*}}, identifier: // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo" diff --git a/clang/test/CodeGenCXX/debug-info-template.cpp b/clang/test/CodeGenCXX/debug-info-template.cpp index d4a7112a585..54fac0b36ee 100644 --- a/clang/test/CodeGenCXX/debug-info-template.cpp +++ b/clang/test/CodeGenCXX/debug-info-template.cpp @@ -25,8 +25,9 @@ struct TC { int glb; void func(); -// CHECK: [[TCI]] = distinct !DIGlobalVariable(name: "tci", -// CHECK-SAME: type: ![[TCNESTED:[0-9]+]] +// CHECK: [[TCI]] = !DIGlobalVariableExpression(var: [[TCIV:.*]]) +// CHECK: [[TCIV]] = distinct !DIGlobalVariable(name: "tci", +// CHECK-SAME: type: ![[TCNESTED:[0-9]+]] // CHECK: ![[TCNESTED]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "nested", // CHECK-SAME: scope: ![[TC:[0-9]+]], @@ -83,8 +84,9 @@ TC // CHECK: [[TCARG7_3]] = !DITemplateValueParameter(type: [[INT]], value: i32 3) 3>::nested tci; -// CHECK: [[TCN]] = distinct !DIGlobalVariable(name: "tcn" -// CHECK-SAME: type: ![[TCNT:[0-9]+]] +// CHECK: [[TCN]] = !DIGlobalVariableExpression(var: [[TCNV:.*]]) +// CHECK: [[TCNV]] = distinct !DIGlobalVariable(name: "tcn" +// CHECK-SAME: type: ![[TCNT:[0-9]+]] TC // CHECK: ![[TCNT]] ={{.*}}!DICompositeType(tag: DW_TAG_structure_type, name: "TC<int, -3, nullptr, nullptr, nullptr, nullptr>" // CHECK-SAME: templateParams: [[TCNARGS:![0-9]*]] @@ -123,8 +125,9 @@ template <template <typename> class tmpl, int &lvr, int &&rvr> struct NN { }; -// CHECK: [[NN]] = distinct !DIGlobalVariable(name: "nn" -// CHECK-SAME: type: ![[NNT:[0-9]+]] +// CHECK: [[NN]] = !DIGlobalVariableExpression(var: [[NNV:.*]]) +// CHECK: [[NNV]] = distinct !DIGlobalVariable(name: "nn" +// CHECK-SAME: type: ![[NNT:[0-9]+]] // FIXME: these parameters should probably be rendered as 'glb' rather than // '&glb', since they're references, not pointers. diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp index 722b9c08f8b..9575a5129e3 100644 --- a/clang/test/CodeGenCXX/debug-info.cpp +++ b/clang/test/CodeGenCXX/debug-info.cpp @@ -8,8 +8,9 @@ // !llvm.dbg.cu pulls in globals and their types first. // CHECK-NOT: !DIGlobalVariable(name: "c" -// CHECK: [[X]] = distinct !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE" -// CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]] +// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:!.*]]) +// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE" +// CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]] // CHECK: [[INCARRAYPTR]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[INCARRAY:![0-9]+]] // CHECK: [[INCARRAY]] = !DICompositeType(tag: DW_TAG_array_type // CHECK-NOT: line: diff --git a/clang/test/CodeGenCXX/inline-dllexport-member.cpp b/clang/test/CodeGenCXX/inline-dllexport-member.cpp index e1a19fb3fa8..66ef459bd80 100644 --- a/clang/test/CodeGenCXX/inline-dllexport-member.cpp +++ b/clang/test/CodeGenCXX/inline-dllexport-member.cpp @@ -7,6 +7,7 @@ struct __declspec(dllexport) s { static const unsigned int ui = 0; }; -// CHECK: [[UI]] = distinct !DIGlobalVariable(name: "ui", linkageName: "\01?ui@s@@2IB", scope: ![[SCOPE:[0-9]+]], +// CHECK: [[UI]] = !DIGlobalVariableExpression(var: [[UIV:.*]]) +// CHECK: [[UIV]] = distinct !DIGlobalVariable(name: "ui", linkageName: "\01?ui@s@@2IB", scope: ![[SCOPE:[0-9]+]], // CHECK: ![[SCOPE]] = distinct !DICompileUnit( |