[llvm] e74d626 - [IPO] Fix EXPENSIVE_CHECKS assert added at D83744. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 02:29:33 PST 2021


Author: Simon Pilgrim
Date: 2021-03-11T10:29:15Z
New Revision: e74d6269259e28225a494ce98bd1762cdac1fe89

URL: https://github.com/llvm/llvm-project/commit/e74d6269259e28225a494ce98bd1762cdac1fe89
DIFF: https://github.com/llvm/llvm-project/commit/e74d6269259e28225a494ce98bd1762cdac1fe89.diff

LOG: [IPO] Fix EXPENSIVE_CHECKS assert added at D83744. NFCI.

It wasn't taking into account that QueryingAA was a pointer.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 86f08ac563f2..cbf33bccefe3 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1127,11 +1127,11 @@ struct Attributor {
                    DepClassTy DepClass, bool ForceUpdate = false) {
 #ifdef EXPENSIVE_CHECKS
     // Don't allow callbase information to leak.
-    if (auto CBContext = IRP.getCallBaseContext()) {
+    if (auto *CBContext = IRP.getCallBaseContext()) {
       assert(
           ((CBContext->getCalledFunction() == IRP.getAnchorScope() ||
-            QueryingAA ||
-            !QueryingAA.getIRPosition().isAnyCallSitePosition())) &&
+            !QueryingAA ||
+            !QueryingAA->getIRPosition().isAnyCallSitePosition())) &&
           "non callsite positions are not allowed to propagate CallBaseContext "
           "across functions");
     }


        


More information about the llvm-commits mailing list