forked from OSchip/llvm-project
Swap the DIFile in DILexicalBlockFile out for the raw name/directory pair
This is the last change in transitioning all DIScopes to have a common prefix. llvm-svn: 177756
This commit is contained in:
parent
7c5b88b134
commit
61ef2be3e5
|
@ -604,12 +604,6 @@ namespace llvm {
|
|||
DIScope getContext() const { if (getScope().isSubprogram()) return getScope(); return getScope().getContext(); }
|
||||
unsigned getLineNumber() const { return getScope().getLineNumber(); }
|
||||
unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
|
||||
StringRef getDirectory() const {
|
||||
return getFieldAs<DIFile>(1).getDirectory();
|
||||
}
|
||||
StringRef getFilename() const {
|
||||
return getFieldAs<DIFile>(1).getFilename();
|
||||
}
|
||||
DILexicalBlock getScope() const { return getFieldAs<DILexicalBlock>(2); }
|
||||
bool Verify() const;
|
||||
};
|
||||
|
|
|
@ -1007,7 +1007,7 @@ DILexicalBlockFile DIBuilder::createLexicalBlockFile(DIDescriptor Scope,
|
|||
DIFile File) {
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_lexical_block),
|
||||
File,
|
||||
File.getFileNode(),
|
||||
Scope
|
||||
};
|
||||
DILexicalBlockFile R(MDNode::get(VMContext, Elts));
|
||||
|
|
|
@ -664,16 +664,12 @@ DIArray DISubprogram::getVariables() const {
|
|||
StringRef DIScope::getFilename() const {
|
||||
if (!DbgNode)
|
||||
return StringRef();
|
||||
if (isLexicalBlockFile())
|
||||
return DILexicalBlockFile(DbgNode).getFilename();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 0);
|
||||
}
|
||||
|
||||
StringRef DIScope::getDirectory() const {
|
||||
if (!DbgNode)
|
||||
return StringRef();
|
||||
if (isLexicalBlockFile())
|
||||
return DILexicalBlockFile(DbgNode).getDirectory();
|
||||
return ::getStringField(getNodeField(DbgNode, 1), 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue