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:
David Blaikie 2013-03-22 20:18:46 +00:00
parent 7c5b88b134
commit 61ef2be3e5
3 changed files with 1 additions and 11 deletions

View File

@ -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;
};

View File

@ -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));

View File

@ -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);
}