brintos

brintos / llvm-project-archived public Read only

0
0
Text · 892 B · cf44570 Raw
27 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited %s -O1 -disable-llvm-passes -o - | FileCheck %s2 3// Ensure class definitions are not emitted to debug info just because the4// vtable is emitted for optimization purposes (as available_externally). The5// class definition debug info should only go where the vtable is actually6// emitted into the object file.7 8// CHECK: @_ZTV3foo = available_externally9 10// Verify that this doesn't involve querying for the vtable of types that aren't11// dynamic (that would cause an assertion in the case below)12 13// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "bar<int>"14template <typename> struct bar {};15extern template struct bar<int>;16bar<int> *p1;17bar<int> a;18 19// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"20// CHECK-SAME: DIFlagFwdDecl21 22struct foo {23  virtual void f();24};25 26foo f;27