Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DebugInfo] Add debug location to stubs generated by CGDeclCXX and ma…
…rk them as artificial Differential Revision: https://reviews.llvm.org/D66328 llvm-svn: 371080
- Loading branch information
Showing
7 changed files
with
75 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s | ||
|
||
struct a { | ||
~a(); | ||
}; | ||
template <typename b> struct c : a { | ||
c(void (b::*)()); | ||
}; | ||
struct B { | ||
virtual void e(); | ||
}; | ||
c<B> *d() { static c<B> f(&B::e); return &f; } | ||
|
||
// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@YAXXZ"() | ||
// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] { | ||
// CHECK: call void @"??1?$c@UB@@@@QEAA@XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A"), !dbg ![[LOCATION:[0-9]+]] | ||
// CHECK-NEXT: ret void, !dbg ![[LOCATION]] | ||
// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'" | ||
// CHECK-SAME: flags: DIFlagArtificial | ||
// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s | ||
|
||
struct b { | ||
b(char *); | ||
~b(); | ||
}; | ||
struct a { | ||
~a(); | ||
}; | ||
struct { | ||
b c; | ||
const a &d; | ||
} e[]{nullptr, {}}; | ||
|
||
// CHECK: define internal void @__cxx_global_array_dtor(i8* %0) | ||
// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] { | ||
// CHECK: arraydestroy.body | ||
// CHECK: %arraydestroy.elementPast = | ||
// CHECK-SAME: !dbg ![[LOCATION:[0-9]+]] | ||
// CHECK: call void @"??1<unnamed-type-e>@@QEAA@XZ"(%struct.anon* %arraydestroy.element) | ||
// CHECK-SAME: !dbg ![[LOCATION]] | ||
// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "__cxx_global_array_dtor" | ||
// CHECK-SAME: flags: DIFlagArtificial | ||
// CHECK: ![[LOCATION]] = !DILocation(line: 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters