[llvm] r266552 - IR: Use getRawScope() when verifying
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 16 22:41:10 PDT 2016
Author: dexonsmith
Date: Sun Apr 17 00:41:09 2016
New Revision: 266552
URL: http://llvm.org/viewvc/llvm-project?rev=266552&view=rev
Log:
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*.
Modified:
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=266552&r1=266551&r2=266552&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Sun Apr 17 00:41:09 2016
@@ -860,7 +860,7 @@ void Verifier::visitDIDerivedType(const
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(cons
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());
More information about the llvm-commits
mailing list