diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index b535b3e6e949..b5b14b95f667 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -278,7 +278,7 @@ unsigned MCContext::GetDwarfFile(StringRef Directory, StringRef FileName, if (!tFileName.empty()) { Directory = sys::path::parent_path(FileName); if (!Directory.empty()) - FileName = sys::path::filename(FileName); + FileName = tFileName; } }