summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-11-28 10:31:27 +0000
committerDuncan Sands <baldrick@free.fr>2011-11-28 10:31:27 +0000
commit4c0c5451c78423bcc08e23f230e912e35d11dc4d (patch)
tree7d8703fe62bc60d96edf3dd0c83ef3e198d40a7e /lib/Target/ARM/ARMFastISel.cpp
parent70b883b3a723b1d0af538c0b78cd45139597d216 (diff)
downloadllvm-4c0c5451c78423bcc08e23f230e912e35d11dc4d.tar.gz
llvm-4c0c5451c78423bcc08e23f230e912e35d11dc4d.tar.bz2
llvm-4c0c5451c78423bcc08e23f230e912e35d11dc4d.tar.xz
Silence wrong warnings from GCC about variables possibly being used
uninitialized: GCC doesn't understand that the variables are only used if !UseImm, in which case they have been initialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--lib/Target/ARM/ARMFastISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 9bae422273..42fd8a6ab9 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -1360,7 +1360,7 @@ bool ARMFastISel::ARMEmitCmp(const Value *Src1Value, const Value *Src2Value,
unsigned SrcReg1 = getRegForValue(Src1Value);
if (SrcReg1 == 0) return false;
- unsigned SrcReg2;
+ unsigned SrcReg2 = 0;
if (!UseImm) {
SrcReg2 = getRegForValue(Src2Value);
if (SrcReg2 == 0) return false;
@@ -1577,7 +1577,7 @@ bool ARMFastISel::SelectSelect(const Instruction *I) {
(ARM_AM::getSOImmVal(Imm) != -1);
}
- unsigned Op2Reg;
+ unsigned Op2Reg = 0;
if (!UseImm) {
Op2Reg = getRegForValue(I->getOperand(2));
if (Op2Reg == 0) return false;