From 2b7fe3c50b242dd6ddc98b561a07bdbd54880cb0 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*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266552 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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());