aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-07-27 20:51:15 +0000
committerDevang Patel <dpatel@apple.com>2010-07-27 20:51:15 +0000
commit37032350c8c95a3d742b75be101c11b32f4211d7 (patch)
tree3062ffde81c61534f4b2d146de9d5041a2bae906 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent90f8795e1c0d43e5b3d6254ff2a3cad533069218 (diff)
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index b81aad92cb..64a9b25532 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<unsigned>::iterator DI = DirectoryIdMap.find(DirName);
if (DI != DirectoryIdMap.end()) {