summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-11-05 22:04:14 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-11-05 22:04:14 +0000
commit0900fe0f1bdae8e87d0400c89673601217055c93 (patch)
tree2e78bf289095138dadf955b82f27fcbd4fdd228e
parentd4bff30370db9f2cb13838897012768739cf1ee0 (diff)
downloadbcm5719-llvm-0900fe0f1bdae8e87d0400c89673601217055c93.tar.gz
bcm5719-llvm-0900fe0f1bdae8e87d0400c89673601217055c93.zip
CodeGen: Update for debug info API change.
Differential Revision: http://reviews.llvm.org/D14266 llvm-svn: 252220
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp12
-rw-r--r--clang/test/CodeGen/debug-info-block-decl.c2
-rw-r--r--clang/test/CodeGenCXX/debug-info-static-fns.cpp4
-rw-r--r--clang/test/CodeGenCXX/debug-info-windows-dtor.cpp6
-rw-r--r--clang/test/CodeGenCXX/globalinit-loc.cpp2
-rw-r--r--clang/test/CodeGenCXX/linetable-virtual-variadic.cpp6
-rw-r--r--clang/test/CodeGenObjCXX/property-objects.mm2
7 files changed, 17 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 7efd1ecba9a..30a184cf638 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1183,7 +1183,7 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(
RecordTy, MethodName, MethodLinkageName, MethodDefUnit, MethodLine,
MethodTy, /*isLocalToUnit=*/false,
/* isDefinition=*/false, Virtuality, VIndex, ContainingType, Flags,
- CGM.getLangOpts().Optimize, nullptr, TParamsArray.get());
+ CGM.getLangOpts().Optimize, TParamsArray.get());
SPCache[Method->getCanonicalDecl()].reset(SP);
@@ -2486,7 +2486,7 @@ CGDebugInfo::getFunctionForwardDeclaration(const FunctionDecl *FD) {
llvm::DISubprogram *SP = DBuilder.createTempFunctionFwdDecl(
DContext, Name, LinkageName, Unit, Line,
getOrCreateFunctionType(FD, FnType, Unit), !FD->isExternallyVisible(),
- /* isDefinition = */ false, 0, Flags, CGM.getLangOpts().Optimize, nullptr,
+ /* isDefinition = */ false, 0, Flags, CGM.getLangOpts().Optimize,
TParamsArray.get(), getFunctionDeclaration(FD));
const FunctionDecl *CanonDecl = cast<FunctionDecl>(FD->getCanonicalDecl());
FwdDeclReplaceMap.emplace_back(std::piecewise_construct,
@@ -2699,8 +2699,9 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
llvm::DISubprogram *SP = DBuilder.createFunction(
FDContext, Name, LinkageName, Unit, LineNo,
getOrCreateFunctionType(D, FnType, Unit), Fn->hasInternalLinkage(),
- true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize, Fn,
+ true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize,
TParamsArray.get(), getFunctionDeclaration(D));
+ Fn->setSubprogram(SP);
// We might get here with a VarDecl in the case we're generating
// code for the initialization of globals. Do not record these decls
// as they will overwrite the actual VarDecl Decl in the cache.
@@ -2752,9 +2753,8 @@ void CGDebugInfo::EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc,
DBuilder.createFunction(FDContext, Name, LinkageName, Unit, LineNo,
getOrCreateFunctionType(D, FnType, Unit),
false /*internalLinkage*/, true /*definition*/,
- ScopeLine, Flags, CGM.getLangOpts().Optimize, nullptr,
- TParamsArray.get(),
- getFunctionDeclaration(D));
+ ScopeLine, Flags, CGM.getLangOpts().Optimize,
+ TParamsArray.get(), getFunctionDeclaration(D));
}
void CGDebugInfo::EmitLocation(CGBuilderTy &Builder, SourceLocation Loc) {
diff --git a/clang/test/CodeGen/debug-info-block-decl.c b/clang/test/CodeGen/debug-info-block-decl.c
index 334e026a8b5..e45a2d8ad47 100644
--- a/clang/test/CodeGen/debug-info-block-decl.c
+++ b/clang/test/CodeGen/debug-info-block-decl.c
@@ -5,7 +5,7 @@
// CHECK: define{{.*}}@main()
// CHECK: store{{.*}}bitcast{{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]]
// CHECK: define {{.*}} @__main_block_invoke
-// CHECK: dbg ![[BLOCK_ENTRY:[0-9]+]]
+// CHECK: , !dbg ![[BLOCK_ENTRY:[0-9]+]]
int main()
{
diff --git a/clang/test/CodeGenCXX/debug-info-static-fns.cpp b/clang/test/CodeGenCXX/debug-info-static-fns.cpp
index 718187e368b..59c7471f7ca 100644
--- a/clang/test/CodeGenCXX/debug-info-static-fns.cpp
+++ b/clang/test/CodeGenCXX/debug-info-static-fns.cpp
@@ -7,7 +7,7 @@ namespace A {
}
// Verify that a is present and mangled.
-// CHECK: !DISubprogram(name: "a", linkageName: "_ZN1AL1aEi",
+// CHECK: define internal i32 @_ZN1AL1aEi({{.*}} !dbg [[DBG:![0-9]+]]
+// CHECK: [[DBG]] = distinct !DISubprogram(name: "a", linkageName: "_ZN1AL1aEi",
// CHECK-SAME: line: 4
// CHECK-SAME: isDefinition: true
-// CHECK-SAME: function: i32 (i32)* @_ZN1AL1aEi
diff --git a/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp b/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
index 79059fedf03..e5a51abae68 100644
--- a/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
+++ b/clang/test/CodeGenCXX/debug-info-windows-dtor.cpp
@@ -14,9 +14,9 @@ struct AB: A, B {
template struct AB<int>;
-// CHECK-LABEL: define {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
+// CHECK: define {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"({{.*}} !dbg [[THUNK_VEC_DEL_DTOR:![0-9]*]]
// CHECK: call {{.*}}@"\01??_G?$AB@H@@UAEPAXI@Z"({{.*}}) #{{[0-9]*}}, !dbg [[THUNK_LOC:![0-9]*]]
-// CHECK-LABEL: define
+// CHECK: define
-// CHECK: [[THUNK_VEC_DEL_DTOR:![0-9]*]] = distinct !DISubprogram({{.*}}function: {{.*}}@"\01??_E?$AB@H@@W3AEPAXI@Z"
+// CHECK: [[THUNK_VEC_DEL_DTOR]] = distinct !DISubprogram
// CHECK: [[THUNK_LOC]] = !DILocation(line: 15, scope: [[THUNK_VEC_DEL_DTOR]])
diff --git a/clang/test/CodeGenCXX/globalinit-loc.cpp b/clang/test/CodeGenCXX/globalinit-loc.cpp
index babcf3f6cb6..203eb214266 100644
--- a/clang/test/CodeGenCXX/globalinit-loc.cpp
+++ b/clang/test/CodeGenCXX/globalinit-loc.cpp
@@ -4,7 +4,7 @@
// Verify that the global init helper function does not get associated
// with any source location.
//
-// CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp
+// CHECK: define internal {{.*}}void @_GLOBAL__sub_I_globalinit_loc.cpp({{.*}} {
// CHECK: !dbg ![[DBG:.*]]
// CHECK: !DISubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp"
// CHECK-NOT: line:
diff --git a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp b/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
index 4a0772a271c..8d1bf47814f 100644
--- a/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
+++ b/clang/test/CodeGenCXX/linetable-virtual-variadic.cpp
@@ -10,7 +10,7 @@ class Derived : public virtual Base {
void Derived::VariadicFunction(...) { }
-// CHECK-LABEL: define void @_ZN7Derived16VariadicFunctionEz(
+// CHECK: define void @_ZN7Derived16VariadicFunctionEz({{.*}} !dbg ![[SP:[0-9]+]]
// CHECK: ret void, !dbg ![[LOC:[0-9]+]]
// CHECK-LABEL: define void @_ZT{{.+}}N7Derived16VariadicFunctionEz(
// CHECK: ret void, !dbg ![[LOC:[0-9]+]]
@@ -18,6 +18,6 @@ void Derived::VariadicFunction(...) { }
// CHECK: !llvm.dbg.cu = !{![[CU:[0-9]+]]}
//
// CHECK: ![[CU]] = distinct !DICompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]]
-// CHECK: ![[SPs]] = !{![[SP:[0-9]+]]}
-// CHECK: ![[SP]] = distinct !DISubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz
+// CHECK: ![[SPs]] = !{![[SP]]}
+// CHECK: ![[SP]] = distinct !DISubprogram(name: "VariadicFunction"
// CHECK: ![[LOC]] = !DILocation({{.*}}scope: ![[SP]])
diff --git a/clang/test/CodeGenObjCXX/property-objects.mm b/clang/test/CodeGenObjCXX/property-objects.mm
index f2ffb0ae52d..8e0b6aebe14 100644
--- a/clang/test/CodeGenObjCXX/property-objects.mm
+++ b/clang/test/CodeGenObjCXX/property-objects.mm
@@ -37,7 +37,7 @@ struct CGRect {
// Don't attach debug locations to the prologue instructions. These were
// leaking over from the previous function emission by accident.
-// CHECK: define internal void @"\01-[I setBounds:]"
+// CHECK: define internal void @"\01-[I setBounds:]"({{.*}} {
// CHECK-NOT: !dbg
// CHECK: call void @llvm.dbg.declare
- (void)setFrame:(CGRect)frameRect {}
OpenPOWER on IntegriCloud