diff options
Diffstat (limited to 'contrib/llvm/lib/VMCore/DebugInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/VMCore/DebugInfo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/llvm/lib/VMCore/DebugInfo.cpp b/contrib/llvm/lib/VMCore/DebugInfo.cpp index c8f8f7d..3029ce2 100644 --- a/contrib/llvm/lib/VMCore/DebugInfo.cpp +++ b/contrib/llvm/lib/VMCore/DebugInfo.cpp @@ -111,6 +111,16 @@ Function *DIDescriptor::getFunctionField(unsigned Elt) const { return 0; } +void DIDescriptor::replaceFunctionField(unsigned Elt, Function *F) { + if (DbgNode == 0) + return; + + if (Elt < DbgNode->getNumOperands()) { + MDNode *Node = const_cast<MDNode*>(DbgNode); + Node->replaceOperandWith(Elt, F); + } +} + unsigned DIVariable::getNumAddrElements() const { if (getVersion() <= LLVMDebugVersion8) return DbgNode->getNumOperands()-6; |