Since Split DWARF needs to name the actual .dwo file that is generated, it can't be known at the time the llvm::Module is produced as it may be merged with other Modules before the object is generated and that object may be generated with any name. By passing the Split DWARF file name when LLVM is producing object code the .dwo file name in the object file can match correctly. The support for Split DWARF for implicit modules remains the same - using metadata to store the dwo name and dwo id so that potentially multiple skeleton CUs referring to different dwo files can be generated from one llvm::Module. llvm-svn: 301063
13 lines
619 B
C
13 lines
619 B
C
// RUN: %clang_cc1 -debug-info-kind=limited -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck %s
|
|
// RUN: %clang_cc1 -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck --check-prefix=VANILLA %s
|
|
int main (void) {
|
|
return 0;
|
|
}
|
|
|
|
// Testing to ensure that the dwo name gets output into the compile unit.
|
|
// CHECK: !DICompileUnit({{.*}}, splitDebugFilename: "foo.dwo"
|
|
|
|
// Testing to ensure that the dwo name is not output into the compile unit if
|
|
// it's for vanilla split-dwarf rather than split-dwarf for implicit modules.
|
|
// VANILLA-NOT: splitDebugFilename
|