summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-17 05:41:09 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-04-17 05:41:09 +0000
commitc98ec20a0e31b6cf9b5c1f2c418d177d4661cdf5 (patch)
tree6437f2839ed8693a47ad66244b8a087bc2d74362
parent99042473d075b10c275f357682aec8bbb8fc1667 (diff)
downloadbcm5719-llvm-c98ec20a0e31b6cf9b5c1f2c418d177d4661cdf5.tar.gz
bcm5719-llvm-c98ec20a0e31b6cf9b5c1f2c418d177d4661cdf5.zip
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*. llvm-svn: 266552
-rw-r--r--llvm/lib/IR/Verifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index e480e4e9c69..083d385f110 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -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());
OpenPOWER on IntegriCloud