summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-26 21:59:17 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-26 21:59:17 +0000
commitd03326b75a57fbe03c328117d5bf675e7fbdc833 (patch)
tree9575a7f00969309d5c813c9fe7e2f773d2d7dc6c /llvm/lib
parent567fa62ddc32c69e4dfe5a365463f06df5abc051 (diff)
downloadbcm5719-llvm-d03326b75a57fbe03c328117d5bf675e7fbdc833.tar.gz
bcm5719-llvm-d03326b75a57fbe03c328117d5bf675e7fbdc833.zip
Debug Info: Provide a means to update the members of a composite type
This will be used to factor out some uses of magic number operand offsets inside Clang where these fields were updated in an effort to resolve forward declarations/circular references. llvm-svn: 178078
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 5ab64265e49..1916f5ea966 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -25,6 +25,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ValueHandle.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
using namespace llvm::dwarf;
@@ -615,6 +616,16 @@ MDNode *DIDerivedType::getObjCProperty() const {
return dyn_cast_or_null<MDNode>(DbgNode->getOperand(10));
}
+/// \brief Set the array of member DITypes
+void DICompositeType::setTypeArray(DIArray Elements, DIArray TParams) {
+ assert(!TParams || DbgNode->getNumOperands() == 14 && "If you're setting the template parameters this should include a slot for that");
+ TrackingVH<MDNode> N(*this);
+ N->replaceOperandWith(10, Elements);
+ if (TParams)
+ N->replaceOperandWith(13, TParams);
+ DbgNode = N;
+}
+
/// isInlinedFnArgument - Return true if this variable provides debugging
/// information for an inlined function arguments.
bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
OpenPOWER on IntegriCloud