blob: dc15dd07f965740f3cbe76747ab4625b6940723a [file] [log] [blame]
Adrian McCarthy99242982016-08-16 22:11:18 +00001// RUN: %clang_cc1 -triple i386-pc-windows -emit-llvm -gcodeview -debug-info-kind=limited -fms-compatibility %s -x c++ -o - | FileCheck %s
2
3// Ensure we emit debug info for the full definition of base classes that will
4// be imported from a DLL. Otherwise, the debugger wouldn't be able to show the
5// members.
6
Reid Klecknerc9404e12016-09-09 16:27:04 +00007// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "OutOfLineCtor",
8// CHECK-SAME: DIFlagFwdDecl
9// CHECK-SAME: ){{$}}
10
Adrian McCarthy99242982016-08-16 22:11:18 +000011// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedBase",
12// CHECK-NOT: DIFlagFwdDecl
13// CHECK-SAME: ){{$}}
14
Reid Klecknerc9404e12016-09-09 16:27:04 +000015// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedMethod",
16// CHECK-NOT: DIFlagFwdDecl
17// CHECK-SAME: ){{$}}
18
19struct OutOfLineCtor {
20 OutOfLineCtor();
21 virtual void Foo();
22};
23
Adrian McCarthy99242982016-08-16 22:11:18 +000024struct __declspec(dllimport) ImportedBase {
25 ImportedBase();
26 virtual void Foo();
27};
28
29struct DerivedFromImported : public ImportedBase {};
30
Reid Klecknerc9404e12016-09-09 16:27:04 +000031struct ImportedMethod {
32 ImportedMethod();
33 virtual void Foo();
34 static void __declspec(dllimport) create();
35};
36
Adrian McCarthy99242982016-08-16 22:11:18 +000037int main() {
Reid Klecknerc9404e12016-09-09 16:27:04 +000038 OutOfLineCtor o;
Adrian McCarthy99242982016-08-16 22:11:18 +000039 DerivedFromImported d;
Reid Klecknerc9404e12016-09-09 16:27:04 +000040 ImportedMethod m;
Adrian McCarthy99242982016-08-16 22:11:18 +000041}