Use getSplitDebugFilename when constructing the skeleton cu and

update testcase accordingly to give the correct name to the cu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2013-02-22 23:50:08 +00:00
parent e4b67906d3
commit 3ce51a970f
2 changed files with 3 additions and 5 deletions

View File

@ -2543,10 +2543,8 @@ CompileUnit *DwarfDebug::constructSkeletonCU(const MDNode *N) {
DIUnit.getLanguage(), Die, Asm,
this, &SkeletonHolder);
SmallString<16> T(DIUnit.getFilename());
sys::path::replace_extension(T, ".dwo");
StringRef FN = sys::path::filename(T);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name, FN);
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
DIUnit.getSplitDebugFilename());
// This should be a unique identifier when we want to build .dwp files.
NewCU->addUInt(Die, dwarf::DW_AT_GNU_dwo_id, dwarf::DW_FORM_data8, 0);