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
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b81aad9..64a9b25 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1753,10 +1753,7 @@
 /// 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<unsigned>::iterator DI = DirectoryIdMap.find(DirName);
   if (DI != DirectoryIdMap.end()) {