IF directory name is empty then try to extract one using absolute file name.
llvm-svn: 109262
This commit is contained in:
parent
b59625ecea
commit
3032354bbe
|
@ -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…
Reference in New Issue