diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 3a47cb7c53e4a727d84942d3db900dcfdd8bcb81..9b53152fac40b39f39c1b9c6b2b7af206890e49c 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2855,7 +2855,7 @@ CGDebugInfo::getGlobalVariableForwardDeclaration(const VarDecl *VD) { auto Align = getDeclAlignIfRequired(VD, CGM.getContext()); auto *GV = DBuilder.createTempGlobalVariableFwdDecl( DContext, Name, LinkageName, Unit, Line, getOrCreateType(T, Unit), - !VD->isExternallyVisible(), nullptr, Align); + !VD->isExternallyVisible(), nullptr, nullptr, Align); FwdDeclReplaceMap.emplace_back( std::piecewise_construct, std::make_tuple(cast<VarDecl>(VD->getCanonicalDecl())), @@ -2873,12 +2873,8 @@ llvm::DINode *CGDebugInfo::getDeclarationOrDefinition(const Decl *D) { getOrCreateFile(TD->getLocation())); auto I = DeclCache.find(D->getCanonicalDecl()); - if (I != DeclCache.end()) { - auto N = I->second; - if (auto *GVE = dyn_cast_or_null<llvm::DIGlobalVariableExpression>(N)) - return GVE->getVariable(); - return dyn_cast_or_null<llvm::DINode>(N); - } + if (I != DeclCache.end()) + return dyn_cast_or_null<llvm::DINode>(I->second); // No definition for now. Emit a forward definition that might be // merged with a potential upcoming definition. @@ -3654,10 +3650,10 @@ CGDebugInfo::getOrCreateStaticDataMemberDeclarationOrNull(const VarDecl *D) { return CreateRecordStaticField(D, Ctxt, cast<RecordDecl>(DC)); } -llvm::DIGlobalVariableExpression *CGDebugInfo::CollectAnonRecordDecls( +llvm::DIGlobalVariable *CGDebugInfo::CollectAnonRecordDecls( const RecordDecl *RD, llvm::DIFile *Unit, unsigned LineNo, StringRef LinkageName, llvm::GlobalVariable *Var, llvm::DIScope *DContext) { - llvm::DIGlobalVariableExpression *GVE = nullptr; + llvm::DIGlobalVariable *GV = nullptr; for (const auto *Field : RD->fields()) { llvm::DIType *FieldTy = getOrCreateType(Field->getType(), Unit); @@ -3666,17 +3662,16 @@ llvm::DIGlobalVariableExpression *CGDebugInfo::CollectAnonRecordDecls( // Ignore unnamed fields, but recurse into anonymous records. if (FieldName.empty()) { if (const auto *RT = dyn_cast<RecordType>(Field->getType())) - GVE = CollectAnonRecordDecls(RT->getDecl(), Unit, LineNo, LinkageName, + GV = CollectAnonRecordDecls(RT->getDecl(), Unit, LineNo, LinkageName, Var, DContext); continue; } // Use VarDecl's Tag, Scope and Line number. - GVE = DBuilder.createGlobalVariableExpression( - DContext, FieldName, LinkageName, Unit, LineNo, FieldTy, - Var->hasLocalLinkage()); - Var->addDebugInfo(GVE); + GV = DBuilder.createGlobalVariable(DContext, FieldName, LinkageName, Unit, + LineNo, FieldTy, Var->hasLocalLinkage()); + Var->addDebugInfo(GV); } - return GVE; + return GV; } void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, @@ -3689,8 +3684,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, // it to the llvm::GlobalVariable. auto Cached = DeclCache.find(D->getCanonicalDecl()); if (Cached != DeclCache.end()) - return Var->addDebugInfo( - cast<llvm::DIGlobalVariableExpression>(Cached->second)); + return Var->addDebugInfo(cast<llvm::DIGlobalVariable>(Cached->second)); // Create global variable debug descriptor. llvm::DIFile *Unit = nullptr; @@ -3702,7 +3696,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, // Attempt to store one global variable for the declaration - even if we // emit a lot of fields. - llvm::DIGlobalVariableExpression *GVE = nullptr; + llvm::DIGlobalVariable *GV = nullptr; // If this is an anonymous union then we'll want to emit a global // variable for each member of the anonymous union so that it's possible @@ -3711,16 +3705,16 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, const RecordDecl *RD = T->castAs<RecordType>()->getDecl(); assert(RD->isAnonymousStructOrUnion() && "unnamed non-anonymous struct or union?"); - GVE = CollectAnonRecordDecls(RD, Unit, LineNo, LinkageName, Var, DContext); + GV = CollectAnonRecordDecls(RD, Unit, LineNo, LinkageName, Var, DContext); } else { auto Align = getDeclAlignIfRequired(D, CGM.getContext()); - GVE = DBuilder.createGlobalVariableExpression( + GV = DBuilder.createGlobalVariable( DContext, DeclName, LinkageName, Unit, LineNo, getOrCreateType(T, Unit), Var->hasLocalLinkage(), /*Expr=*/nullptr, getOrCreateStaticDataMemberDeclarationOrNull(D), Align); - Var->addDebugInfo(GVE); + Var->addDebugInfo(GV); } - DeclCache[D->getCanonicalDecl()].reset(GVE); + DeclCache[D->getCanonicalDecl()].reset(GV); } void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, const APValue &Init) { @@ -3771,7 +3765,7 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, const APValue &Init) { else if (Init.isFloat() && CGM.getContext().getTypeSize(VD->getType()) <= 64) InitExpr = DBuilder.createConstantValueExpression( Init.getFloat().bitcastToAPInt().getZExtValue()); - GV.reset(DBuilder.createGlobalVariableExpression( + GV.reset(DBuilder.createGlobalVariable( DContext, Name, StringRef(), Unit, getLineNumber(VD->getLocation()), Ty, true, InitExpr, getOrCreateStaticDataMemberDeclarationOrNull(VarD), Align)); @@ -3918,8 +3912,6 @@ void CGDebugInfo::finalize() { else Repl = it->second; - if (auto *GVE = dyn_cast_or_null<llvm::DIGlobalVariableExpression>(Repl)) - Repl = GVE->getVariable(); DBuilder.replaceTemporary(std::move(FwdDecl), cast<llvm::MDNode>(Repl)); } diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 70e3d484b4761dca926331d83cc5850b9e2def8f..4cf7bb32380b9c2f922ed29e846dceff8714fac8 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -496,14 +496,14 @@ private: llvm::DIGlobalVariable * getGlobalVariableForwardDeclaration(const VarDecl *VD); - /// Return a global variable that represents one of the collection of global - /// variables created for an anonmyous union. + /// \brief Return a global variable that represents one of the + /// collection of global variables created for an anonmyous union. /// /// Recursively collect all of the member fields of a global /// anonymous decl and create static variables for them. The first /// time this is called it needs to be on a union and then from /// there we can have additional unnamed fields. - llvm::DIGlobalVariableExpression * + llvm::DIGlobalVariable * CollectAnonRecordDecls(const RecordDecl *RD, llvm::DIFile *Unit, unsigned LineNo, StringRef LinkageName, llvm::GlobalVariable *Var, llvm::DIScope *DContext); diff --git a/test/CodeGen/2009-10-20-GlobalDebug.c b/test/CodeGen/2009-10-20-GlobalDebug.c index 0d7c759f905e69025f5b96cc74d0ef5a85ae6687..38f20cdb6b055cb98cbc7243f5e2291a673d53fe 100644 --- a/test/CodeGen/2009-10-20-GlobalDebug.c +++ b/test/CodeGen/2009-10-20-GlobalDebug.c @@ -10,11 +10,9 @@ int main() { return 0; } -// 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, +// 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, diff --git a/test/CodeGen/2010-08-10-DbgConstant.c b/test/CodeGen/2010-08-10-DbgConstant.c index 68947edd526a2cf89e8148476a23bf24d34a02ef..3a40c240bea97c9e5946f2cc98f0b4a33890f527 100644 --- a/test/CodeGen/2010-08-10-DbgConstant.c +++ b/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: !DIGlobalVariableExpression(var: [[VAR:.*]], expr: [[EXPR:![0-9]+]]) +// CHECK: !DIGlobalVariable({{.*}}, expr: [[EXPR:![0-9]+]]) // CHECK: [[EXPR]] = !DIExpression(DW_OP_constu, 201, DW_OP_stack_value) static const unsigned int ro = 201; diff --git a/test/CodeGen/debug-info-atomic.c b/test/CodeGen/debug-info-atomic.c index 3de0d3585d2916ec426ea5d56394fc7d9fae00e4..06b9546908c61f215feeed20f2aa42986436676b 100644 --- a/test/CodeGen/debug-info-atomic.c +++ b/test/CodeGen/debug-info-atomic.c @@ -1,8 +1,7 @@ // RUN: %clang -g -c -std=c11 -S -emit-llvm -o - %s | FileCheck %s -// 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) +// 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) _Atomic const int i; diff --git a/test/CodeGen/debug-info-global-constant.c b/test/CodeGen/debug-info-global-constant.c index 4175f24675e56ce9567ce5fa184ef2165de89145..f214fdcd113b51c07530318ae9c70c6baa31712e 100644 --- a/test/CodeGen/debug-info-global-constant.c +++ b/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]] = !DIGlobalVariableExpression(var: ![[VAR:.*]], expr: ![[EXPR:[0-9]+]]) -// CHECK: ![[VAR]] = distinct !DIGlobalVariable(name: "i", +// CHECK: ![[I]] = distinct !DIGlobalVariable(name: "i", +// CHECK-SAME: expr: ![[EXPR:[0-9]+]] // CHECK: !DICompileUnit({{.*}}globals: ![[GLOBALS:[0-9]+]]) // CHECK: ![[GLOBALS]] = !{![[I]]} // CHECK: ![[EXPR]] = !DIExpression(DW_OP_constu, 1, DW_OP_stack_value) diff --git a/test/CodeGen/debug-info-static-const-fp.c b/test/CodeGen/debug-info-static-const-fp.c index 4dfe057f2b6e21592573d5dbf41026c8a9b27871..67cda82c5f679b375b3339a74d1a4a1d345bfa0a 100644 --- a/test/CodeGen/debug-info-static-const-fp.c +++ b/test/CodeGen/debug-info-static-const-fp.c @@ -33,22 +33,14 @@ int main() { return hVal + fVal + dVal + ldVal; } -// 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: +// 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: diff --git a/test/CodeGen/debug-info-static.c b/test/CodeGen/debug-info-static.c index 016f1e6e6cc573a86cc4cf741d371503cac6d893..0ebd6a626d8f0271b83265a2d58aa736c2d0fa6d 100644 --- a/test/CodeGen/debug-info-static.c +++ b/test/CodeGen/debug-info-static.c @@ -2,8 +2,7 @@ // CHECK: @f.xyzzy = internal global i32 0, align 4, !dbg [[XYZZY:![0-9]+]] -// CHECK: [[XYZZY]] = !DIGlobalVariableExpression(var: [[VAR:.*]]) -// CHECK: [[VAR]] = distinct !DIGlobalVariable +// CHECK: [[XYZZY]] = distinct !DIGlobalVariable void f(void) { static int xyzzy; diff --git a/test/CodeGenCXX/debug-info-global.cpp b/test/CodeGenCXX/debug-info-global.cpp index 5abc050431d1d9f1925d3b8df595176e1b8d9ebd..795602380d20f61ed7024a9e7649bbb05c635f6c 100644 --- a/test/CodeGenCXX/debug-info-global.cpp +++ b/test/CodeGenCXX/debug-info-global.cpp @@ -15,8 +15,7 @@ int f1() { // CHECK: [[GLOBALS]] = !{[[CNST:![0-9]*]]} -// CHECK: [[CNST]] = !DIGlobalVariableExpression(var: [[CNSTV:.*]], expr: -// CHECK: [[CNSTV]] = distinct !DIGlobalVariable(name: "cnst", -// CHECK-SAME: scope: [[NS:![0-9]*]] +// CHECK: [[CNST]] = distinct !DIGlobalVariable(name: "cnst", +// CHECK-SAME: scope: [[NS:![0-9]*]] // CHECK: [[NS]] = !DINamespace(name: "ns" diff --git a/test/CodeGenCXX/debug-info-static-member.cpp b/test/CodeGenCXX/debug-info-static-member.cpp index c777ccb2aba2987facee49a60ec45a2ccff97825..d28c2ac865f70ab135aaed69000a81db70030000 100644 --- a/test/CodeGenCXX/debug-info-static-member.cpp +++ b/test/CodeGenCXX/debug-info-static-member.cpp @@ -32,9 +32,7 @@ public: // why the definition of "a" comes before the declarations while // "b" and "c" come after. -// CHECK: [[A]] = !DIGlobalVariableExpression(var: [[AV:.*]]) -// CHECK: [[AV]] = distinct !DIGlobalVariable(name: "a", -// CHECK-SAME: declaration: ![[DECL_A:[0-9]+]]) +// CHECK: [[A]] = distinct !DIGlobalVariable(name: "a", {{.*}} 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" @@ -45,9 +43,7 @@ public: // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "static_decl_templ_var" int C::a = 4; -// CHECK: [[B]] = !DIGlobalVariableExpression(var: [[BV:.*]]) -// CHECK: [[BV]] = distinct !DIGlobalVariable(name: "b", -// CHECK-SAME: declaration: ![[DECL_B:[0-9]+]]) +// CHECK: [[B]] = distinct !DIGlobalVariable(name: "b", {{.*}} declaration: ![[DECL_B:[0-9]+]]) // CHECK: ![[DECL_B]] = !DIDerivedType(tag: DW_TAG_member, name: "b" // CHECK-NOT: size: // CHECK-NOT: align: @@ -93,8 +89,7 @@ int C::a = 4; // CHECK-SAME: flags: DIFlagPublic | DIFlagStaticMember) int C::b = 2; -// CHECK: [[C]] = !DIGlobalVariableExpression(var: [[CV:.*]]) -// CHECK: [[CV]] = distinct !DIGlobalVariable(name: "c", {{.*}} declaration: ![[DECL_C]]) +// CHECK: [[C]] = distinct !DIGlobalVariable(name: "c", {{.*}} declaration: ![[DECL_C]]) int C::c = 1; int main() diff --git a/test/CodeGenCXX/debug-info-template-member.cpp b/test/CodeGenCXX/debug-info-template-member.cpp index 2b840745ffeb91ce1f8941561fcea8b7f452134f..749b92e93ba66aea0c068e8f2efd90daa6af176e 100644 --- a/test/CodeGenCXX/debug-info-template-member.cpp +++ b/test/CodeGenCXX/debug-info-template-member.cpp @@ -19,9 +19,8 @@ inline int add3(int x) { } // The compile unit pulls in the global variables first. -// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:.*]]) -// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x", -// CHECK-SAME: type: ![[OUTER_FOO_INNER_ID:[0-9]+]] +// CHECK: [[X]] = 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/test/CodeGenCXX/debug-info-template.cpp b/test/CodeGenCXX/debug-info-template.cpp index 54fac0b36eecbe5b51790a6062b7f3018713085d..d4a7112a58517ff3cab0e120ddc74188639db0a5 100644 --- a/test/CodeGenCXX/debug-info-template.cpp +++ b/test/CodeGenCXX/debug-info-template.cpp @@ -25,9 +25,8 @@ struct TC { int glb; void func(); -// CHECK: [[TCI]] = !DIGlobalVariableExpression(var: [[TCIV:.*]]) -// CHECK: [[TCIV]] = distinct !DIGlobalVariable(name: "tci", -// CHECK-SAME: type: ![[TCNESTED:[0-9]+]] +// CHECK: [[TCI]] = 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]+]], @@ -84,9 +83,8 @@ TC // CHECK: [[TCARG7_3]] = !DITemplateValueParameter(type: [[INT]], value: i32 3) 3>::nested tci; -// CHECK: [[TCN]] = !DIGlobalVariableExpression(var: [[TCNV:.*]]) -// CHECK: [[TCNV]] = distinct !DIGlobalVariable(name: "tcn" -// CHECK-SAME: type: ![[TCNT:[0-9]+]] +// CHECK: [[TCN]] = 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]*]] @@ -125,9 +123,8 @@ template <template <typename> class tmpl, int &lvr, int &&rvr> struct NN { }; -// CHECK: [[NN]] = !DIGlobalVariableExpression(var: [[NNV:.*]]) -// CHECK: [[NNV]] = distinct !DIGlobalVariable(name: "nn" -// CHECK-SAME: type: ![[NNT:[0-9]+]] +// CHECK: [[NN]] = 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/test/CodeGenCXX/debug-info.cpp b/test/CodeGenCXX/debug-info.cpp index 9575a5129e3d1f03e5a92e01941a76b7b22b1f1e..722b9c08f8bd7ed200d8a36118b40f9cb8c7191a 100644 --- a/test/CodeGenCXX/debug-info.cpp +++ b/test/CodeGenCXX/debug-info.cpp @@ -8,9 +8,8 @@ // !llvm.dbg.cu pulls in globals and their types first. // CHECK-NOT: !DIGlobalVariable(name: "c" -// CHECK: [[X]] = !DIGlobalVariableExpression(var: [[XV:!.*]]) -// CHECK: [[XV]] = distinct !DIGlobalVariable(name: "x", linkageName: "_ZN6pr96081xE" -// CHECK-SAME: type: [[INCARRAYPTR:![0-9]*]] +// CHECK: [[X]] = 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/test/CodeGenCXX/inline-dllexport-member.cpp b/test/CodeGenCXX/inline-dllexport-member.cpp index 66ef459bd80b32e6a58dec7b92e724256bdb8eb5..e1a19fb3fa858117f8ebc9ccc9fbee98f163d08f 100644 --- a/test/CodeGenCXX/inline-dllexport-member.cpp +++ b/test/CodeGenCXX/inline-dllexport-member.cpp @@ -7,7 +7,6 @@ struct __declspec(dllexport) s { static const unsigned int ui = 0; }; -// CHECK: [[UI]] = !DIGlobalVariableExpression(var: [[UIV:.*]]) -// CHECK: [[UIV]] = distinct !DIGlobalVariable(name: "ui", linkageName: "\01?ui@s@@2IB", scope: ![[SCOPE:[0-9]+]], +// CHECK: [[UI]] = distinct !DIGlobalVariable(name: "ui", linkageName: "\01?ui@s@@2IB", scope: ![[SCOPE:[0-9]+]], // CHECK: ![[SCOPE]] = distinct !DICompileUnit(