This is the last change in transitioning all DIScopes to have a common prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177756
91177308-0d34-0410-b5e6-
96231b3b80d8
DIScope getContext() const { if (getScope().isSubprogram()) return getScope(); return getScope().getContext(); }
unsigned getLineNumber() const { return getScope().getLineNumber(); }
unsigned getColumnNumber() const { return getScope().getColumnNumber(); }
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;
};
DILexicalBlock getScope() const { return getFieldAs<DILexicalBlock>(2); }
bool Verify() const;
};
DIFile File) {
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_lexical_block),
DIFile File) {
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_lexical_block),
Scope
};
DILexicalBlockFile R(MDNode::get(VMContext, Elts));
Scope
};
DILexicalBlockFile R(MDNode::get(VMContext, Elts));
StringRef DIScope::getFilename() const {
if (!DbgNode)
return StringRef();
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();
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);
}
return ::getStringField(getNodeField(DbgNode, 1), 1);
}