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
This commit is contained in:
Devang Patel 2010-07-27 20:51:15 +00:00
parent 90f8795e1c
commit 37032350c8

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