diff options
author | Reid Kleckner <rnk@google.com> | 2016-09-13 00:01:23 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-09-13 00:01:23 +0000 |
commit | 6c7b1c62126cea0146777b878a4516aa23073ae2 (patch) | |
tree | 8ed58cedc055ae45c7d17ec8db8c4711e3dd234b /clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp | |
parent | f8f632498307d22e10fab0704548b270b15f1e1e (diff) | |
download | bcm5719-llvm-6c7b1c62126cea0146777b878a4516aa23073ae2.tar.gz bcm5719-llvm-6c7b1c62126cea0146777b878a4516aa23073ae2.zip |
[DebugInfo] Deduplicate debug info limiting logic
We should be doing the same checks when a type is completed as we do
when a complete type is used during emission. Previously, we duplicated
the logic, and it got out of sync. This could be observed with
dllimported classes.
Also reduce a test case for this slightly.
Implementing review feedback from David Blaikie on r281057.
llvm-svn: 281278
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp b/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp index dc15dd07f96..855ecaaa4c9 100644 --- a/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp +++ b/clang/test/CodeGenCXX/debug-info-dllimport-base-class.cpp @@ -4,6 +4,10 @@ // be imported from a DLL. Otherwise, the debugger wouldn't be able to show the // members. +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedAfterCompletion", +// CHECK-NOT: DIFlagFwdDecl +// CHECK-SAME: ){{$}} + // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "OutOfLineCtor", // CHECK-SAME: DIFlagFwdDecl // CHECK-SAME: ){{$}} @@ -16,6 +20,13 @@ // CHECK-NOT: DIFlagFwdDecl // CHECK-SAME: ){{$}} + +struct ImportedAfterCompletion; +ImportedAfterCompletion *force_fwd_decl; +struct __declspec(dllimport) ImportedAfterCompletion { + virtual ~ImportedAfterCompletion(); +}; + struct OutOfLineCtor { OutOfLineCtor(); virtual void Foo(); @@ -35,6 +46,7 @@ struct ImportedMethod { }; int main() { + ImportedAfterCompletion c; OutOfLineCtor o; DerivedFromImported d; ImportedMethod m; |