IR: Use getRawScope() when verifying

Fix a couple of places in the Verifier that call `getScope()` instead of
`getRawScope()`.  Both DIDerivedType::getScope and
DICompositeType::getScope return a DITypeRef right now (which wraps a
Metadata*) so I don't think there's currently an observable bug.  I
found this because a future commit that will change them to cast to
DIScope*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266552 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2016-04-17 05:41:09 +00:00
parent 0fd5dc0990
commit 2b7fe3c50b

View File

@ -860,7 +860,7 @@ void Verifier::visitDIDerivedType(const DIDerivedType &N) {
N.getExtraData());
}
Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getScope());
Assert(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getRawScope());
Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
N.getBaseType());
}
@ -890,7 +890,7 @@ 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(isScopeRef(N, N.getScope()), "invalid scope", &N, N.getRawScope());
Assert(isTypeRef(N, N.getBaseType()), "invalid base type", &N,
N.getBaseType());