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
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 0982dbb..87659ef 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2543,10 +2543,8 @@
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);