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 | 2881da79296bfa087253de79e40b49b93a5a598d (patch) | |
tree | 0d850e0f2513f9e651cae1e151225d8e347d036a /llvm/lib/IR | |
parent | 431153cf2a21f6532d3d8776e62bb4499a943b30 (diff) | |
download | bcm5719-llvm-2881da79296bfa087253de79e40b49b93a5a598d.tar.gz bcm5719-llvm-2881da79296bfa087253de79e40b49b93a5a598d.zip |
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)
llvm-svn: 177566
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index 05f6c32cabd..4d31fd56cd4 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/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/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index dd7ba23bf1a..897ebb5051e 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/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); } |