[llvm] r177756 - Swap the DIFile in DILexicalBlockFile out for the raw name/directory pair
David Blaikie
dblaikie at gmail.com
Fri Mar 22 13:18:46 PDT 2013
Author: dblaikie
Date: Fri Mar 22 15:18:46 2013
New Revision: 177756
URL: http://llvm.org/viewvc/llvm-project?rev=177756&view=rev
Log:
Swap the DIFile in DILexicalBlockFile out for the raw name/directory pair
This is the last change in transitioning all DIScopes to have a common prefix.
Modified:
llvm/trunk/include/llvm/DebugInfo.h
llvm/trunk/lib/IR/DIBuilder.cpp
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=177756&r1=177755&r2=177756&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Fri Mar 22 15:18:46 2013
@@ -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;
};
Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=177756&r1=177755&r2=177756&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Fri Mar 22 15:18:46 2013
@@ -1007,7 +1007,7 @@ DILexicalBlockFile DIBuilder::createLexi
DIFile File) {
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_lexical_block),
- File,
+ File.getFileNode(),
Scope
};
DILexicalBlockFile R(MDNode::get(VMContext, Elts));
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=177756&r1=177755&r2=177756&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Fri Mar 22 15:18:46 2013
@@ -664,16 +664,12 @@ DIArray DISubprogram::getVariables() con
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);
}
More information about the llvm-commits
mailing list