DebugInfo: more support for mutating DICompositeType to reduce magic number usage in Clang
llvm-svn: 178090
This commit is contained in:
parent
d14757751f
commit
fe6db31ce8
|
@ -359,6 +359,7 @@ namespace llvm {
|
||||||
DICompositeType getContainingType() const {
|
DICompositeType getContainingType() const {
|
||||||
return getFieldAs<DICompositeType>(12);
|
return getFieldAs<DICompositeType>(12);
|
||||||
}
|
}
|
||||||
|
void setContainingType(DICompositeType ContainingType);
|
||||||
DIArray getTemplateParams() const { return getFieldAs<DIArray>(13); }
|
DIArray getTemplateParams() const { return getFieldAs<DIArray>(13); }
|
||||||
|
|
||||||
/// Verify - Verify that a composite type descriptor is well formed.
|
/// Verify - Verify that a composite type descriptor is well formed.
|
||||||
|
|
|
@ -616,7 +616,7 @@ MDNode *DIDerivedType::getObjCProperty() const {
|
||||||
return dyn_cast_or_null<MDNode>(DbgNode->getOperand(10));
|
return dyn_cast_or_null<MDNode>(DbgNode->getOperand(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Set the array of member DITypes
|
/// \brief Set the array of member DITypes.
|
||||||
void DICompositeType::setTypeArray(DIArray Elements, DIArray TParams) {
|
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");
|
assert(!TParams || DbgNode->getNumOperands() == 14 && "If you're setting the template parameters this should include a slot for that");
|
||||||
TrackingVH<MDNode> N(*this);
|
TrackingVH<MDNode> N(*this);
|
||||||
|
@ -626,6 +626,13 @@ void DICompositeType::setTypeArray(DIArray Elements, DIArray TParams) {
|
||||||
DbgNode = N;
|
DbgNode = N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// \brief Set the containing type.
|
||||||
|
void DICompositeType::setContainingType(DICompositeType ContainingType) {
|
||||||
|
TrackingVH<MDNode> N(*this);
|
||||||
|
N->replaceOperandWith(12, ContainingType);
|
||||||
|
DbgNode = N;
|
||||||
|
}
|
||||||
|
|
||||||
/// isInlinedFnArgument - Return true if this variable provides debugging
|
/// isInlinedFnArgument - Return true if this variable provides debugging
|
||||||
/// information for an inlined function arguments.
|
/// information for an inlined function arguments.
|
||||||
bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
|
bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
|
||||||
|
|
Loading…
Reference in New Issue