[llvm-commits] [llvm] r52705 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Matthijs Kooijman
matthijs at stdin.nl
Wed Jun 25 01:12:17 PDT 2008
Author: matthijs
Date: Wed Jun 25 03:12:16 2008
New Revision: 52705
URL: http://llvm.org/viewvc/llvm-project?rev=52705&view=rev
Log:
Fix a (false) warning on darwin.
Modified:
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=52705&r1=52704&r2=52705&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Wed Jun 25 03:12:16 2008
@@ -579,7 +579,7 @@
// 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 @@
NRetTy = Type::VoidTy;
}
+ assert(NRetTy && "No new return type found?");
+
// Remove any incompatible attributes
RAttrs &= ~ParamAttr::typeIncompatible(NRetTy);
if (RAttrs)
More information about the llvm-commits
mailing list