From 64a857ac69d75a2a0c80dffb56e6b8ba2ef535a2 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 12 Jan 2013 15:34:31 +0000 Subject: GlobalOpt: Avoid jump on uninitialized value. Found by valgrind. llvm-svn: 172318 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index de633547463..efec788162b 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -2828,7 +2828,7 @@ bool Evaluator::EvaluateBlock(BasicBlock::iterator CurInst, return false; } - Constant *RetVal; + Constant *RetVal = 0; // Execute the call, if successful, use the return value. ValueStack.push_back(new DenseMap); if (!EvaluateFunction(Callee, RetVal, Formals)) { -- cgit v1.2.3