From 3232814721ab40958df73fbf40680cf4320cc82a Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sun, 17 Apr 2016 05:41:09 +0000 Subject: [PATCH] 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 --- lib/IR/Verifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index e480e4e9c69..083d385f110 100644 --- a/lib/IR/Verifier.cpp +++ b/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());