mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Refactor the filename/directory information in DISubprogram to refer directly to the pair rather than the DIFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -908,7 +908,7 @@ DISubprogram DIBuilder::createFunction(DIDescriptor Context,
|
||||
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
||||
File,
|
||||
File.getFileNode(),
|
||||
getNonCompileUnitScope(Context),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, Name),
|
||||
@@ -955,7 +955,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context,
|
||||
Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_subprogram),
|
||||
F,
|
||||
F.getFileNode(),
|
||||
getNonCompileUnitScope(Context),
|
||||
MDString::get(VMContext, Name),
|
||||
MDString::get(VMContext, Name),
|
||||
|
@@ -668,8 +668,6 @@ StringRef DIScope::getFilename() const {
|
||||
return DILexicalBlockFile(DbgNode).getFilename();
|
||||
if (isLexicalBlock())
|
||||
return DILexicalBlock(DbgNode).getFilename();
|
||||
if (isSubprogram())
|
||||
return DISubprogram(DbgNode).getFilename();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 0);
|
||||
}
|
||||
|
||||
@@ -680,8 +678,6 @@ StringRef DIScope::getDirectory() const {
|
||||
return DILexicalBlockFile(DbgNode).getDirectory();
|
||||
if (isLexicalBlock())
|
||||
return DILexicalBlock(DbgNode).getDirectory();
|
||||
if (isSubprogram())
|
||||
return DISubprogram(DbgNode).getDirectory();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user