[llvm] e273ac4 - [Attributor][NFC] Add an assertion

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 16:15:02 PST 2020


Author: Johannes Doerfert
Date: 2020-01-23T18:13:52-06:00
New Revision: e273ac4d88585d9f31a2f56113bd3457c8335afe

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

LOG: [Attributor][NFC] Add an assertion

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/Attributor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index b39f38d9ac80..981cdd874646 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -971,6 +971,8 @@ class AAReturnedValuesImpl : public AAReturnedValues, public AbstractState {
       indicatePessimisticFixpoint();
       return;
     }
+    assert(!F->getReturnType()->isVoidTy() &&
+           "Did not expect a void return type!");
 
     // The map from instruction opcodes to those instructions in the function.
     auto &OpcodeInstMap = A.getInfoCache().getOpcodeInstMapForFunction(*F);


        


More information about the llvm-commits mailing list