OSDN Git Service

It is FE's responsibility to emit proper directory name.
authorDevang Patel <dpatel@apple.com>
Tue, 27 Jul 2010 20:51:15 +0000 (20:51 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 27 Jul 2010 20:51:15 +0000 (20:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109538 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index b81aad9..64a9b25 100644 (file)
@@ -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<unsigned>::iterator DI = DirectoryIdMap.find(DirName);
   if (DI != DirectoryIdMap.end()) {