diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-25 08:12:16 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-25 08:12:16 +0000 |
commit | ea9e516e86b3a6ca1b3a5b374365735e1cca414d (patch) | |
tree | 26fcc63599a0f07faef7713dc09ca0bbff7fbd28 /lib/Transforms | |
parent | 177058b4bd8980f48ec677fdbf5475ab16702179 (diff) | |
download | external_llvm-ea9e516e86b3a6ca1b3a5b374365735e1cca414d.zip external_llvm-ea9e516e86b3a6ca1b3a5b374365735e1cca414d.tar.gz external_llvm-ea9e516e86b3a6ca1b3a5b374365735e1cca414d.tar.bz2 |
Fix a (false) warning on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 6a0d674..4f05f48 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -579,7 +579,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { // Find out the new return value const Type *RetTy = FTy->getReturnType(); - const Type *NRetTy; + const Type *NRetTy = NULL; unsigned RetCount = NumRetVals(F); // Explicitely track if anything changed, for debugging bool Changed = false; @@ -632,6 +632,8 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { NRetTy = Type::VoidTy; } + assert(NRetTy && "No new return type found?"); + // Remove any incompatible attributes RAttrs &= ~ParamAttr::typeIncompatible(NRetTy); if (RAttrs) |