[Attributor][fix] Remove problematic EXPENSIVE_CHECK
authorkuterd <kuterdinel@gmail.com>
Sat, 13 Mar 2021 14:46:38 +0000 (17:46 +0300)
committerkuterd <kuterdinel@gmail.com>
Sat, 13 Mar 2021 15:03:24 +0000 (18:03 +0300)
Remove the check that is causing compilation issues in
some build configurations.

llvm/include/llvm/Transforms/IPO/Attributor.h

index cbf33bccefe3822e4c552e10378ec97fe432bc00..698a1949af47931c9430fe1707d8c09288aa529a 100644 (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();