summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-24 20:16:36 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-07-24 20:16:36 +0000
commit338aef0a078ac8369c00aeead0d1a9d86e410add (patch)
tree8b0025d98ad89259d717c6e52a5557078960c4ef /llvm/lib
parent0193c3a40e2d1919548e3cd16de60e39dfac5fe9 (diff)
downloadbcm5719-llvm-338aef0a078ac8369c00aeead0d1a9d86e410add.tar.gz
bcm5719-llvm-338aef0a078ac8369c00aeead0d1a9d86e410add.zip
DI: Remove DIDerivedTypeBase
Remove an unnecessary (and confusing) common subclass for `DIDerivedType` and `DICompositeType`. These classes aren't really related, and even in the old debug info hierarchy, there was a long-standing FIXME to separate them. llvm-svn: 243152
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Verifier.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 670fb1017b0..3b041b088f2 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -302,7 +302,6 @@ private:
#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) void visit##CLASS(const CLASS &N);
#include "llvm/IR/Metadata.def"
void visitDIScope(const DIScope &N);
- void visitDIDerivedTypeBase(const DIDerivedTypeBase &N);
void visitDIVariable(const DIVariable &N);
void visitDILexicalBlockBase(const DILexicalBlockBase &N);
void visitDITemplateParameter(const DITemplateParameter &N);
@@ -779,19 +778,10 @@ void Verifier::visitDIBasicType(const DIBasicType &N) {
"invalid tag", &N);
}
-void Verifier::visitDIDerivedTypeBase(const DIDerivedTypeBase &N) {
+void Verifier::visitDIDerivedType(const DIDerivedType &N) {
// Common scope checks.
visitDIScope(N);
- Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getScope());
- Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
- N.getBaseType());
-}
-
-void Verifier::visitDIDerivedType(const DIDerivedType &N) {
- // Common derived type checks.
- visitDIDerivedTypeBase(N);
-
Assert(N.getTag() == dwarf::DW_TAG_typedef ||
N.getTag() == dwarf::DW_TAG_pointer_type ||
N.getTag() == dwarf::DW_TAG_ptr_to_member_type ||
@@ -808,6 +798,10 @@ void Verifier::visitDIDerivedType(const DIDerivedType &N) {
Assert(isTypeRef(N, N.getExtraData()), "invalid pointer to member type", &N,
N.getExtraData());
}
+
+ Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getScope());
+ Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
+ N.getBaseType());
}
static bool hasConflictingReferenceFlags(unsigned Flags) {
@@ -825,8 +819,8 @@ void Verifier::visitTemplateParams(const MDNode &N, const Metadata &RawParams) {
}
void Verifier::visitDICompositeType(const DICompositeType &N) {
- // Common derived type checks.
- visitDIDerivedTypeBase(N);
+ // Common scope checks.
+ visitDIScope(N);
Assert(N.getTag() == dwarf::DW_TAG_array_type ||
N.getTag() == dwarf::DW_TAG_structure_type ||
@@ -835,6 +829,10 @@ void Verifier::visitDICompositeType(const DICompositeType &N) {
N.getTag() == dwarf::DW_TAG_class_type,
"invalid tag", &N);
+ Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getScope());
+ Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
+ N.getBaseType());
+
Assert(!N.getRawElements() || isa<MDTuple>(N.getRawElements()),
"invalid composite elements", &N, N.getRawElements());
Assert(isTypeRef(N, N.getRawVTableHolder()), "invalid vtable holder", &N,
OpenPOWER on IntegriCloud