aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/DebugInfo.h6
-rw-r--r--lib/IR/DIBuilder.cpp2
-rw-r--r--lib/IR/DebugInfo.cpp4
3 files changed, 1 insertions, 11 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index 05ca3853c0..3a2aff3f15 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -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;
};
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 56024573de..033af3bd1d 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -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));
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 990233404e..5ab64265e4 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -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);
}