summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-21 23:08:34 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-21 23:08:34 +0000
commit5ef3fcb745d267b578cc0713ef59cfb667376d3f (patch)
treed960cc427b21181395842620a3b869da5e19fd97 /llvm/lib/IR
parentaf802be01b2aef5970a12bf0d30091a07128934b (diff)
downloadbcm5719-llvm-5ef3fcb745d267b578cc0713ef59cfb667376d3f.tar.gz
bcm5719-llvm-5ef3fcb745d267b578cc0713ef59cfb667376d3f.zip
Refactor the filename/directory information in DISubprogram to refer directly to the pair rather than the DIFile.
llvm-svn: 177677
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp4
-rw-r--r--llvm/lib/IR/DebugInfo.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 7b78b81873c..de01781d29b 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -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),
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index bc5e415eea6..91968d8fbf0 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -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);
}
OpenPOWER on IntegriCloud