brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 855ecaa Raw
54 lines · cpp
1// RUN: %clang_cc1 -triple i386-pc-windows -emit-llvm -gcodeview -debug-info-kind=limited -fms-compatibility %s -x c++ -o - | FileCheck %s2 3// Ensure we emit debug info for the full definition of base classes that will4// be imported from a DLL.  Otherwise, the debugger wouldn't be able to show the5// members.6 7// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedAfterCompletion",8// CHECK-NOT:              DIFlagFwdDecl9// CHECK-SAME:             ){{$}}10 11// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "OutOfLineCtor",12// CHECK-SAME:             DIFlagFwdDecl13// CHECK-SAME:             ){{$}}14 15// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedBase",16// CHECK-NOT:              DIFlagFwdDecl17// CHECK-SAME:             ){{$}}18 19// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "ImportedMethod",20// CHECK-NOT:              DIFlagFwdDecl21// CHECK-SAME:             ){{$}}22 23 24struct ImportedAfterCompletion;25ImportedAfterCompletion *force_fwd_decl;26struct __declspec(dllimport) ImportedAfterCompletion {27  virtual ~ImportedAfterCompletion();28};29 30struct OutOfLineCtor {31  OutOfLineCtor();32  virtual void Foo();33};34 35struct __declspec(dllimport) ImportedBase {36  ImportedBase();37  virtual void Foo();38};39 40struct DerivedFromImported : public ImportedBase {};41 42struct ImportedMethod {43  ImportedMethod();44  virtual void Foo();45  static void __declspec(dllimport) create();46};47 48int main() {49  ImportedAfterCompletion c;50  OutOfLineCtor o;51  DerivedFromImported d;52  ImportedMethod m;53}54