diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-03-20 19:39:15 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-03-20 19:39:15 +0000 |
commit | 6115ed0e4347f17504f72e4d37545b4230b2cb50 (patch) | |
tree | 55a264952ec55bc47cc79b2cd9a272b3713cf66e /lib | |
parent | a625e820711644a3dae22cad53c95100e6e7d3f1 (diff) | |
download | llvm-6115ed0e4347f17504f72e4d37545b4230b2cb50.tar.gz llvm-6115ed0e4347f17504f72e4d37545b4230b2cb50.tar.bz2 llvm-6115ed0e4347f17504f72e4d37545b4230b2cb50.tar.xz |
Refactor file/directory path in namespace debug info to refer directly to the pair rather than the DIFile
(paired to a Clang test - excuse the buildbot skew/fallout)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IR/DIBuilder.cpp | 2 | ||||
-rw-r--r-- | lib/IR/DebugInfo.cpp | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 05f6c32cab..4d31fd56cd 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -984,7 +984,7 @@ DINameSpace DIBuilder::createNameSpace(DIDescriptor Scope, StringRef Name, DIFile File, unsigned LineNo) { Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_namespace), - File, + File.getFileNode(), getNonCompileUnitScope(Scope), MDString::get(VMContext, Name), ConstantInt::get(Type::getInt32Ty(VMContext), LineNo) diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index dd7ba23bf1..897ebb5051 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -672,8 +672,6 @@ StringRef DIScope::getFilename() const { return DISubprogram(DbgNode).getFilename(); if (isCompileUnit()) return DICompileUnit(DbgNode).getFilename(); - if (isNameSpace()) - return DINameSpace(DbgNode).getFilename(); return ::getStringField(getNodeField(DbgNode, 1), 0); } @@ -688,8 +686,6 @@ StringRef DIScope::getDirectory() const { return DISubprogram(DbgNode).getDirectory(); if (isCompileUnit()) return DICompileUnit(DbgNode).getDirectory(); - if (isNameSpace()) - return DINameSpace(DbgNode).getDirectory(); return ::getStringField(getNodeField(DbgNode, 1), 1); } |