It is FE's responsibility to emit proper directory name.

llvm-svn: 109538
This commit is contained in:
Devang Patel 2010-07-27 20:51:15 +00:00
parent 7530049b16
commit 84a74779a1
1 changed files with 1 additions and 4 deletions

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