From 37032350c8c95a3d742b75be101c11b32f4211d7 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 27 Jul 2010 20:51:15 +0000 Subject: [PATCH] It is FE's responsibility to emit proper directory name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109538 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b81aad92cbb..64a9b255326 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1753,10 +1753,7 @@ DIE *DwarfDebug::constructScopeDIE(DbgScope *Scope) { /// maps as well. unsigned DwarfDebug::GetOrCreateSourceID(StringRef DirName, StringRef FileName){ unsigned DId; - if (DirName.empty()) { - llvm::sys::Path CWD = llvm::sys::Path::GetCurrentDirectory(); - DirName = StringRef(CWD.c_str(), CWD.size()); - } + assert (DirName.empty() == false && "Invalid directory name!"); StringMap::iterator DI = DirectoryIdMap.find(DirName); if (DI != DirectoryIdMap.end()) {