summaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 70b4257cae..8a6f006d32 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -497,7 +497,7 @@ bool DICompositeType::Verify() const {
// Make sure DerivedFrom @ field 9 and ContainingType @ field 12 are MDNodes.
if (!fieldIsMDNode(DbgNode, 9))
return false;
- if (!fieldIsMDNode(DbgNode, 12))
+ if (!fieldIsTypeRef(DbgNode, 12))
return false;
// Make sure the type identifier at field 14 is MDString, it can be null.
@@ -721,7 +721,7 @@ DITypeRef DIType::generateRef() {
/// \brief Set the containing type.
void DICompositeType::setContainingType(DICompositeType ContainingType) {
TrackingVH<MDNode> N(*this);
- N->replaceOperandWith(12, ContainingType);
+ N->replaceOperandWith(12, ContainingType.generateRef());
DbgNode = N;
}