mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
IF directory name is empty then try to extract one using absolute file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79ced813d7
commit
f83f42599d
@ -1805,6 +1805,11 @@ void DwarfDebug::constructCompileUnit(const MDNode *N) {
|
||||
DICompileUnit DIUnit(N);
|
||||
StringRef FN = DIUnit.getFilename();
|
||||
StringRef Dir = DIUnit.getDirectory();
|
||||
if (Dir.empty()) {
|
||||
sys::Path AbsFileDirName(FN);
|
||||
AbsFileDirName.makeAbsolute();
|
||||
Dir = AbsFileDirName.getDirname();
|
||||
}
|
||||
unsigned ID = GetOrCreateSourceID(Dir, FN);
|
||||
|
||||
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user