mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 05:15:58 +00:00
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
llvm-svn: 109302
This commit is contained in:
parent
a0b74d8804
commit
df9f5bf991
@ -1753,6 +1753,11 @@ 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());
|
||||
}
|
||||
|
||||
StringMap<unsigned>::iterator DI = DirectoryIdMap.find(DirName);
|
||||
if (DI != DirectoryIdMap.end()) {
|
||||
DId = DI->getValue();
|
||||
|
Loading…
x
Reference in New Issue
Block a user