[llvm-commits] [llvm] r109538 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Devang Patel dpatel at apple.com
Tue Jul 27 13:51:15 PDT 2010


Author: dpatel
Date: Tue Jul 27 15:51:15 2010
New Revision: 109538

URL: http://llvm.org/viewvc/llvm-project?rev=109538&view=rev
Log:
It is FE's responsibility to emit proper directory name.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=109538&r1=109537&r2=109538&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Jul 27 15:51:15 2010
@@ -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()) {





More information about the llvm-commits mailing list