aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-30 18:22:13 +0000
committerChris Lattner <sabre@nondot.org>2008-03-30 18:22:13 +0000
commit2b06cd3076bbc4547d58109722c79b33366d594d (patch)
tree540c5d6ba547c04eee48f2e86ce4f39ffd0c26ed /lib/Target
parent6192ce0a0e5880e48729f9a70a71db52e329b231 (diff)
downloadexternal_llvm-2b06cd3076bbc4547d58109722c79b33366d594d.zip
external_llvm-2b06cd3076bbc4547d58109722c79b33366d594d.tar.gz
external_llvm-2b06cd3076bbc4547d58109722c79b33366d594d.tar.bz2
Fix "Control reaches the end of non-void function" warnings,
patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMInstrInfo.cpp1
-rw-r--r--lib/Target/Alpha/AlphaInstrInfo.cpp1
-rw-r--r--lib/Target/MSIL/MSILWriter.cpp5
-rw-r--r--lib/Target/Mips/MipsISelLowering.cpp1
-rw-r--r--lib/Target/Mips/MipsRegisterInfo.cpp1
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp2
6 files changed, 11 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.cpp b/lib/Target/ARM/ARMInstrInfo.cpp
index 35d6313..10328f7 100644
--- a/lib/Target/ARM/ARMInstrInfo.cpp
+++ b/lib/Target/ARM/ARMInstrInfo.cpp
@@ -919,6 +919,7 @@ unsigned ARM::GetInstSize(MachineInstr *MI) {
}
}
}
+ return 0; // Not reached
}
/// GetFunctionSize - Returns the size of the specified MachineFunction.
diff --git a/lib/Target/Alpha/AlphaInstrInfo.cpp b/lib/Target/Alpha/AlphaInstrInfo.cpp
index 48e23f9..96a75a6 100644
--- a/lib/Target/Alpha/AlphaInstrInfo.cpp
+++ b/lib/Target/Alpha/AlphaInstrInfo.cpp
@@ -307,6 +307,7 @@ static unsigned AlphaRevCondCode(unsigned Opcode) {
default:
assert(0 && "Unknown opcode");
}
+ return 0; // Not reached
}
// Branch analysis.
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index f0a6684..187dd4a 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -259,6 +259,7 @@ std::string MSILWriter::getConvModopt(unsigned CallingConvID) {
cerr << "CallingConvID = " << CallingConvID << '\n';
assert(0 && "Unsupported calling convention");
}
+ return ""; // Not reached
}
@@ -304,6 +305,7 @@ std::string MSILWriter::getPrimitiveTypeName(const Type* Ty, bool isSigned) {
cerr << "Type = " << *Ty << '\n';
assert(0 && "Invalid primitive type");
}
+ return ""; // Not reached
}
@@ -331,6 +333,7 @@ std::string MSILWriter::getTypeName(const Type* Ty, bool isSigned,
cerr << "Type = " << *Ty << '\n';
assert(0 && "Invalid type in getTypeName()");
}
+ return ""; // Not reached
}
@@ -374,6 +377,7 @@ std::string MSILWriter::getTypePostfix(const Type* Ty, bool Expand,
cerr << "TypeID = " << Ty->getTypeID() << '\n';
assert(0 && "Invalid type in TypeToPostfix()");
}
+ return ""; // Not reached
}
@@ -1446,6 +1450,7 @@ unsigned int MSILWriter::getBitWidth(const Type* Ty) {
cerr << "Bits = " << N << '\n';
assert(0 && "Unsupported integer width");
}
+ return 0; // Not reached
}
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp
index 453082c..5c2e1c0 100644
--- a/lib/Target/Mips/MipsISelLowering.cpp
+++ b/lib/Target/Mips/MipsISelLowering.cpp
@@ -181,6 +181,7 @@ SDOperand MipsTargetLowering::
LowerGlobalTLSAddress(SDOperand Op, SelectionDAG &DAG)
{
assert(0 && "TLS not implemented for MIPS.");
+ return SDOperand(); // Not reached
}
SDOperand MipsTargetLowering::
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp
index 4ca5ade..fd04153 100644
--- a/lib/Target/Mips/MipsRegisterInfo.cpp
+++ b/lib/Target/Mips/MipsRegisterInfo.cpp
@@ -81,6 +81,7 @@ getRegisterNumbering(unsigned RegEnum)
case Mips::RA : return 31;
default: assert(0 && "Unknown register number!");
}
+ return 0; // Not reached
}
void MipsRegisterInfo::reMaterialize(MachineBasicBlock &MBB,
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index dff53cd..f307184 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -1104,6 +1104,7 @@ SDOperand PPCTargetLowering::LowerJumpTable(SDOperand Op, SelectionDAG &DAG) {
SDOperand PPCTargetLowering::LowerGlobalTLSAddress(SDOperand Op,
SelectionDAG &DAG) {
assert(0 && "TLS not implemented for PPC.");
+ return SDOperand(); // Not reached
}
SDOperand PPCTargetLowering::LowerGlobalAddress(SDOperand Op,
@@ -1197,6 +1198,7 @@ SDOperand PPCTargetLowering::LowerVAARG(SDOperand Op, SelectionDAG &DAG,
const PPCSubtarget &Subtarget) {
assert(0 && "VAARG in ELF32 ABI not implemented yet!");
+ return SDOperand(); // Not reached
}
SDOperand PPCTargetLowering::LowerVASTART(SDOperand Op, SelectionDAG &DAG,