[llvm-commits] [llvm] r135486 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h include/llvm/Support/Dwarf.h lib/Analysis/DIBuilder.cpp lib/Analysis/DebugInfo.cpp
Bob Wilson
bob.wilson at apple.com
Tue Jul 19 09:32:50 PDT 2011
Author: bwilson
Date: Tue Jul 19 11:32:50 2011
New Revision: 135486
URL: http://llvm.org/viewvc/llvm-project?rev=135486&view=rev
Log:
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/include/llvm/Support/Dwarf.h
llvm/trunk/lib/Analysis/DIBuilder.cpp
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=135486&r1=135485&r2=135486&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Tue Jul 19 11:32:50 2011
@@ -628,9 +628,7 @@
uint64_t getAddrElement(unsigned Idx) const {
if (getVersion() <= llvm::LLVMDebugVersion8)
return getUInt64Field(Idx+6);
- if (getVersion() == llvm::LLVMDebugVersion9)
- return getUInt64Field(Idx+7);
- return getUInt64Field(Idx+8);
+ return getUInt64Field(Idx+7);
}
/// isBlockByrefVariable - Return true if the variable was declared as
@@ -718,13 +716,6 @@
/// suitable to hold function specific information.
NamedMDNode *getFnSpecificMDNode(const Module &M, StringRef Name);
- /// createInlinedVariable - Create a new inlined variable based on current
- /// variable.
- /// @param DV Current Variable.
- /// @param InlinedScope Location at current variable is inlined.
- DIVariable createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
- LLVMContext &VMContext);
-
class DebugInfoFinder {
public:
/// processModule - Process entire module and collect debug info
Modified: llvm/trunk/include/llvm/Support/Dwarf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=135486&r1=135485&r2=135486&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Dwarf.h (original)
+++ llvm/trunk/include/llvm/Support/Dwarf.h Tue Jul 19 11:32:50 2011
@@ -22,9 +22,8 @@
// Debug info constants.
enum {
- LLVMDebugVersion = (10 << 16), // Current version of debug information.
- LLVMDebugVersion9 = (9 << 16), // Constant for version 9.
- LLVMDebugVersion8 = (8 << 16), // Constant for version 8.
+ LLVMDebugVersion = (9 << 16), // Current version of debug information.
+ LLVMDebugVersion8 = (8 << 16), // Cconstant for version 8.
LLVMDebugVersion7 = (7 << 16), // Constant for version 7.
LLVMDebugVersion6 = (6 << 16), // Constant for version 6.
LLVMDebugVersion5 = (5 << 16), // Constant for version 5.
Modified: llvm/trunk/lib/Analysis/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DIBuilder.cpp?rev=135486&r1=135485&r2=135486&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DIBuilder.cpp (original)
+++ llvm/trunk/lib/Analysis/DIBuilder.cpp Tue Jul 19 11:32:50 2011
@@ -626,8 +626,7 @@
File,
ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))),
Ty,
- ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
- Constant::getNullValue(Type::getInt32Ty(VMContext)),
+ ConstantInt::get(Type::getInt32Ty(VMContext), Flags)
};
MDNode *Node = MDNode::get(VMContext, Elts);
if (AlwaysPreserve) {
@@ -662,7 +661,6 @@
Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), (LineNo | (ArgNo << 24))));
Elts.push_back(Ty);
Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
- Elts.push_back(llvm::Constant::getNullValue(Type::getInt32Ty(VMContext)));
Elts.append(Addr.begin(), Addr.end());
return DIVariable(MDNode::get(VMContext, Elts));
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=135486&r1=135485&r2=135486&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Tue Jul 19 11:32:50 2011
@@ -111,9 +111,7 @@
unsigned DIVariable::getNumAddrElements() const {
if (getVersion() <= llvm::LLVMDebugVersion8)
return DbgNode->getNumOperands()-6;
- if (getVersion() == llvm::LLVMDebugVersion9)
- return DbgNode->getNumOperands()-7;
- return DbgNode->getNumOperands()-8;
+ return DbgNode->getNumOperands()-7;
}
@@ -762,19 +760,6 @@
return M.getOrInsertNamedMetadata(Name.str());
}
-/// createInlinedVariable - Create a new inlined variable based on current
-/// variable.
-/// @param DV Current Variable.
-/// @param InlinedScope Location at current variable is inlined.
-DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
- LLVMContext &VMContext) {
- SmallVector<Value *, 16> Elts;
- // Insert inlined scope as 7th element.
- for (unsigned i = 0, e = DV->getNumOperands(); i != e; ++i)
- i == 7 ? Elts.push_back(InlinedScope) :
- Elts.push_back(DV->getOperand(i));
- return DIVariable(MDNode::get(VMContext, Elts));
-}
//===----------------------------------------------------------------------===//
// DebugInfoFinder implementations.
More information about the llvm-commits
mailing list