Killing warnings
llvm-svn: 1175
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
index 5860e14..bf27a2a 100644
--- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
@@ -825,7 +825,7 @@
MemAccessInst* memInst = (MemAccessInst*) vmInstrNode->getInstruction();
// Initialize so we default to storing the offset in a register.
- int64_t smallConstOffset;
+ int64_t smallConstOffset = 0;
Value* valueForRegOffset = NULL;
MachineOperand::MachineOperandType offsetOpType =MachineOperand::MO_VirtualRegister;
@@ -835,7 +835,7 @@
if (idxVec.size() > 0)
{
bool isConstantOffset = false;
- unsigned offset;
+ unsigned offset = 0;
const PointerType* ptrType = (PointerType*) ptrVal->getType();
@@ -1616,7 +1616,7 @@
bool mustClearReg;
int valueToMove;
- MachineOpCode movOpCode;
+ MachineOpCode movOpCode = 0;
Value* ccValue = NULL;
if (subtreeRoot->leftChild()->getValue()->getType()->isIntegral() ||
diff --git a/llvm/lib/Target/Sparc/SparcInternals.h b/llvm/lib/Target/Sparc/SparcInternals.h
index e7caf13..d715d79 100644
--- a/llvm/lib/Target/Sparc/SparcInternals.h
+++ b/llvm/lib/Target/Sparc/SparcInternals.h
@@ -301,6 +301,7 @@
else {
cerr << "TypeID: " << ty << endl;
assert(0 && "Cannot resolve register class for type");
+ return 0;
}
if(isCCReg)
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
index 9f7d5c9..6ce2df3 100644
--- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp
+++ b/llvm/lib/Target/Sparc/SparcRegInfo.cpp
@@ -523,9 +523,10 @@
CorrectCol = SparcIntRegOrder::o0;
else if(RegClassID == FloatRegClassID)
CorrectCol = SparcFloatRegOrder::f0;
- else
+ else {
assert( 0 && "Unknown RegClass");
-
+ return;
+ }
// if the LR received the correct color, NOTHING to do
@@ -787,15 +788,15 @@
unsigned RegClassID = getRegClassIDOfValue(RetVal);
unsigned RegType = getRegType( RetVal );
-
unsigned CorrectCol;
if(RegClassID == IntRegClassID)
CorrectCol = SparcIntRegOrder::i0;
else if(RegClassID == FloatRegClassID)
CorrectCol = SparcFloatRegOrder::f0;
- else
+ else {
assert( 0 && "Unknown RegClass");
-
+ return;
+ }
// if the LR received the correct color, NOTHING to do