forked from OSchip/llvm-project
Always use current working directory for DW_AT_comp_dir.
llvm-svn: 109535
This commit is contained in:
parent
93da3b2e41
commit
4f6e73b168
|
@ -184,15 +184,6 @@ llvm::StringRef CGDebugInfo::getCurrentDirname() {
|
||||||
return CWDName = llvm::StringRef(CompDirnamePtr, CWD.size());
|
return CWDName = llvm::StringRef(CompDirnamePtr, CWD.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getCompDirname - AT_comp_dir is empty if filename is absulte otherwise
|
|
||||||
/// it points to compilation directory.
|
|
||||||
llvm::StringRef CGDebugInfo::getCompDirname(llvm::StringRef Filename) {
|
|
||||||
llvm::sys::Path FilePath(Filename);
|
|
||||||
if (FilePath.isAbsolute())
|
|
||||||
return llvm::StringRef();
|
|
||||||
return getCurrentDirname();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// CreateCompileUnit - Create new compile unit.
|
/// CreateCompileUnit - Create new compile unit.
|
||||||
void CGDebugInfo::CreateCompileUnit() {
|
void CGDebugInfo::CreateCompileUnit() {
|
||||||
|
|
||||||
|
@ -246,7 +237,7 @@ void CGDebugInfo::CreateCompileUnit() {
|
||||||
|
|
||||||
// Create new compile unit.
|
// Create new compile unit.
|
||||||
TheCU = DebugFactory.CreateCompileUnit(
|
TheCU = DebugFactory.CreateCompileUnit(
|
||||||
LangTag, Filename, getCompDirname(Filename),
|
LangTag, Filename, getCurrentDirname(),
|
||||||
Producer, true,
|
Producer, true,
|
||||||
LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers);
|
LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers);
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,10 +199,6 @@ private:
|
||||||
llvm::DIDescriptor getContextDescriptor(const Decl *Decl,
|
llvm::DIDescriptor getContextDescriptor(const Decl *Decl,
|
||||||
llvm::DIDescriptor &CU);
|
llvm::DIDescriptor &CU);
|
||||||
|
|
||||||
/// getCompDirname - AT_comp_dir is empty if filename is absulte otherwise
|
|
||||||
/// it points to compilation directory.
|
|
||||||
llvm::StringRef getCompDirname(llvm::StringRef Filename);
|
|
||||||
|
|
||||||
/// getCurrentDirname - Return current directory name.
|
/// getCurrentDirname - Return current directory name.
|
||||||
llvm::StringRef getCurrentDirname();
|
llvm::StringRef getCurrentDirname();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue