diff options
Diffstat (limited to 'clang/test/Modules/codegen.test')
-rw-r--r-- | clang/test/Modules/codegen.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/test/Modules/codegen.test b/clang/test/Modules/codegen.test index 6807640e603..ce252e89ebd 100644 --- a/clang/test/Modules/codegen.test +++ b/clang/test/Modules/codegen.test @@ -3,8 +3,8 @@ REQUIRES: x86-registered-target RUN: %clang_cc1 -triple=x86_64-linux-gnu -fmodules-codegen -x c++ -fmodules -emit-module -fmodule-name=foo %S/Inputs/codegen/foo.modulemap -o %t/foo.pcm -RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %t/foo.pcm | FileCheck --check-prefix=FOO --check-prefix=BOTH %s -RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - -fmodules -fmodule-file=%t/foo.pcm %S/Inputs/codegen/use.cpp | FileCheck --check-prefix=BOTH --check-prefix=USE %s +RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -debug-info-kind=limited -o - %t/foo.pcm | FileCheck --check-prefix=FOO --check-prefix=BOTH %s +RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -debug-info-kind=limited -o - -fmodules -fmodule-file=%t/foo.pcm %S/Inputs/codegen/use.cpp | FileCheck --check-prefix=BOTH --check-prefix=USE %s FOO: $_Z2f1PKcz = comdat any FOO: $_ZN13implicit_dtorD1Ev = comdat any @@ -25,3 +25,11 @@ FOO: define weak_odr void @_ZN13implicit_dtorD2Ev USE: define linkonce_odr void @_ZN20uninst_implicit_dtorD1Ev USE: define linkonce_odr void @_Z4instIiEvv USE: define linkonce_odr void @_ZN20uninst_implicit_dtorD2Ev + +Modular debug info puts the definition of a class defined in a module in that +module's object. Users of the module only get a declaration. + +'distinct' is used for definition records (the flags field is empty/unspecified) +FOO: = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "implicit_dtor" +Declarations are non-distinct and include the 'DIFlagFwdDecl' flag. +USE: = !DICompositeType(tag: DW_TAG_structure_type, name: "implicit_dtor", {{.*}}, flags: DIFlagFwdDecl |