[llvm-commits] [llvm] r173242 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Duncan Sands
baldrick at free.fr
Wed Jan 23 01:09:50 PST 2013
Author: baldrick
Date: Wed Jan 23 03:09:50 2013
New Revision: 173242
URL: http://llvm.org/viewvc/llvm-project?rev=173242&view=rev
Log:
Initialize the components of this class. Otherwise GCC thinks that Array may be
used uninitialized, since it fails to understand that Array is only used when
SingleValue is not, and outputs a warning. It also seems generally safer given
that the constructor is non-trivial and has plenty of early exits.
Modified:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=173242&r1=173241&r2=173242&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Jan 23 03:09:50 2013
@@ -3382,7 +3382,8 @@
ConstantInt *Offset,
const SmallVector<std::pair<ConstantInt*, Constant*>, 4>& Values,
Constant *DefaultValue,
- const DataLayout *TD) {
+ const DataLayout *TD)
+ : SingleValue(0), BitMap(0), BitMapElementTy(0), Array(0) {
assert(Values.size() && "Can't build lookup table without values!");
assert(TableSize >= Values.size() && "Can't fit values in table!");
More information about the llvm-commits
mailing list