diff options
author | Bob Wilson <bob.wilson@apple.com> | 2011-07-19 16:32:50 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2011-07-19 16:32:50 +0000 |
commit | f51bb7cef8b0aa25506308c2ec0fcde58e1dc7ed (patch) | |
tree | 7d99d66215f2cfef128cc874115e24861cc96a46 /lib/Analysis | |
parent | 66fc541abef7d391d5632cc8f1c2c0b6d34f11a6 (diff) | |
download | external_llvm-f51bb7cef8b0aa25506308c2ec0fcde58e1dc7ed.zip external_llvm-f51bb7cef8b0aa25506308c2ec0fcde58e1dc7ed.tar.gz external_llvm-f51bb7cef8b0aa25506308c2ec0fcde58e1dc7ed.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135486 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/DIBuilder.cpp | 4 | ||||
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 17 |
2 files changed, 2 insertions, 19 deletions
diff --git a/lib/Analysis/DIBuilder.cpp b/lib/Analysis/DIBuilder.cpp index da57808..ac5eeeb 100644 --- a/lib/Analysis/DIBuilder.cpp +++ b/lib/Analysis/DIBuilder.cpp @@ -626,8 +626,7 @@ DIVariable DIBuilder::createLocalVariable(unsigned Tag, DIDescriptor Scope, 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 @@ DIVariable DIBuilder::createComplexVariable(unsigned Tag, DIDescriptor Scope, 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)); diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 8fac3fb..b42e946 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -111,9 +111,7 @@ Function *DIDescriptor::getFunctionField(unsigned Elt) const { 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 @@ NamedMDNode *llvm::getOrInsertFnSpecificMDNode(Module &M, StringRef FuncName) { 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. |