diff options
author | Duncan Sands <baldrick@free.fr> | 2013-01-23 09:09:50 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2013-01-23 09:09:50 +0000 |
commit | 70465616c29538e21e4dc3e0a70d8edb4b93bf5f (patch) | |
tree | f0d59ac1cbcb7ce14b3259dfa618ad512765dbdb /lib/Transforms | |
parent | 023d97d70305dfe5a1a24659496ef95dc6bf3d39 (diff) | |
download | external_llvm-70465616c29538e21e4dc3e0a70d8edb4b93bf5f.zip external_llvm-70465616c29538e21e4dc3e0a70d8edb4b93bf5f.tar.gz external_llvm-70465616c29538e21e4dc3e0a70d8edb4b93bf5f.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index f10c35f..0988a96 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -3382,7 +3382,8 @@ SwitchLookupTable::SwitchLookupTable(Module &M, 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!"); |