mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70017e44cd
commit
2f58485fc8
@ -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…
Reference in New Issue
Block a user