[Attributor][fix] Remove problematic EXPENSIVE_CHECK

Remove the check that is causing compilation issues in
some build configurations.
This commit is contained in:
kuterd 2021-03-13 17:46:38 +03:00
parent 4224a36957
commit 44c1425c17
1 changed files with 0 additions and 11 deletions

View File

@ -1125,17 +1125,6 @@ struct Attributor {
const AAType &
getOrCreateAAFor(IRPosition IRP, const AbstractAttribute *QueryingAA,
DepClassTy DepClass, bool ForceUpdate = false) {
#ifdef EXPENSIVE_CHECKS
// Don't allow callbase information to leak.
if (auto *CBContext = IRP.getCallBaseContext()) {
assert(
((CBContext->getCalledFunction() == IRP.getAnchorScope() ||
!QueryingAA ||
!QueryingAA->getIRPosition().isAnyCallSitePosition())) &&
"non callsite positions are not allowed to propagate CallBaseContext "
"across functions");
}
#endif
if (!shouldPropagateCallBaseContext(IRP))
IRP = IRP.stripCallBaseContext();