mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Refactor file/directory path in namespace debug info to refer directly to the pair rather than the DIFile
(paired to a Clang test - excuse the buildbot skew/fallout) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -984,7 +984,7 @@ DINameSpace DIBuilder::createNameSpace(DIDescriptor Scope, StringRef Name,
|
||||
DIFile File, unsigned LineNo) {
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_namespace),
|
||||
File,
|
||||
File.getFileNode(),
|
||||
getNonCompileUnitScope(Scope),
|
||||
MDString::get(VMContext, Name),
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo)
|
||||
|
@@ -672,8 +672,6 @@ StringRef DIScope::getFilename() const {
|
||||
return DISubprogram(DbgNode).getFilename();
|
||||
if (isCompileUnit())
|
||||
return DICompileUnit(DbgNode).getFilename();
|
||||
if (isNameSpace())
|
||||
return DINameSpace(DbgNode).getFilename();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 0);
|
||||
}
|
||||
|
||||
@@ -688,8 +686,6 @@ StringRef DIScope::getDirectory() const {
|
||||
return DISubprogram(DbgNode).getDirectory();
|
||||
if (isCompileUnit())
|
||||
return DICompileUnit(DbgNode).getDirectory();
|
||||
if (isNameSpace())
|
||||
return DINameSpace(DbgNode).getDirectory();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user