diff options
author | Kyle Butt <kyle+llvm@iteratee.net> | 2016-01-15 19:20:06 +0000 |
---|---|---|
committer | Kyle Butt <kyle+llvm@iteratee.net> | 2016-01-15 19:20:06 +0000 |
commit | 132bf36161772d0593941f9e686950c9a49551cd (patch) | |
tree | 021063794dbe36662e1d3cb2210d6db61f2929f9 /llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | |
parent | b6066385268ac16273e4eb0c4c725222151d7e40 (diff) | |
download | bcm5719-llvm-132bf36161772d0593941f9e686950c9a49551cd.tar.gz bcm5719-llvm-132bf36161772d0593941f9e686950c9a49551cd.zip |
Codegen: [PPC] Silence false-positive initialization warning. NFC
Some compilers don't do exhaustive switch checking. For those compilers,
add an initialization to prevent un-initialized variable warnings from
firing. For compilers with exhaustive switch checking, we still get a
guarantee that the switch is exhaustive, and hence the initializations
are redundant, and a non-functional change.
llvm-svn: 257923
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp index dcff6ad2486..149cc4dbea0 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp @@ -746,8 +746,8 @@ void PPCInstrInfo::insertSelect(MachineBasicBlock &MBB, unsigned OpCode = Is64Bit ? PPC::ISEL8 : PPC::ISEL; auto SelectPred = static_cast<PPC::Predicate>(Cond[0].getImm()); - unsigned SubIdx; - bool SwapOps; + unsigned SubIdx = 0; + bool SwapOps = false; switch (SelectPred) { case PPC::PRED_EQ: case PPC::PRED_EQ_MINUS: |