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()) {