diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-09-06 18:46:00 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-09-06 18:46:00 +0000 |
commit | e42279cda481b48138d2119f4a4bbce7077f0a72 (patch) | |
tree | 7ed0b8521bcd57f6ab0b94ad41a5a637f84e7470 /lib/IR/DebugInfo.cpp | |
parent | 5930eabe0fdc48c02c5af500aa5b1c5b732848b1 (diff) | |
download | external_llvm-e42279cda481b48138d2119f4a4bbce7077f0a72.zip external_llvm-e42279cda481b48138d2119f4a4bbce7077f0a72.tar.gz external_llvm-e42279cda481b48138d2119f4a4bbce7077f0a72.tar.bz2 |
Debug Info: Use identifier to reference DIType in containing type field of
a DICompositeType.
Verifier is updated accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190190 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r-- | lib/IR/DebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index 70b4257..8a6f006 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; } |