forked from OSchip/llvm-project
CodeGen: Update for debug info API change.
Differential Revision: http://reviews.llvm.org/D14266 llvm-svn: 252220
This commit is contained in:
parent
d4bff30370
commit
0900fe0f1b
clang
lib/CodeGen
test
|
@ -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) {
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]])
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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]])
|
||||
|
|
|
@ -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 {}
|
||||
|
|
Loading…
Reference in New Issue