1 // 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 
7 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "OutOfLineCtor",
8 // CHECK-SAME:             DIFlagFwdDecl
9 // CHECK-SAME:             ){{$}}
10 
11 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedBase",
12 // CHECK-NOT:              DIFlagFwdDecl
13 // CHECK-SAME:             ){{$}}
14 
15 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedMethod",
16 // CHECK-NOT:              DIFlagFwdDecl
17 // CHECK-SAME:             ){{$}}
18 
19 struct OutOfLineCtor {
20   OutOfLineCtor();
21   virtual void Foo();
22 };
23 
24 struct __declspec(dllimport) ImportedBase {
25   ImportedBase();
26   virtual void Foo();
27 };
28 
29 struct DerivedFromImported : public ImportedBase {};
30 
31 struct ImportedMethod {
32   ImportedMethod();
33   virtual void Foo();
34   static void __declspec(dllimport) create();
35 };
36 
37 int main() {
38   OutOfLineCtor o;
39   DerivedFromImported d;
40   ImportedMethod m;
41 }
42