[llvm-commits] [llvm] r147874 - in /llvm/trunk/lib: MC/MCDisassembler/EDDisassembler.cpp Target/PTX/PTXSubtarget.cpp Target/Sparc/Sparc.h Target/Sparc/SparcInstrInfo.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Jan 10 12:47:20 PST 2012
Author: d0k
Date: Tue Jan 10 14:47:20 2012
New Revision: 147874
URL: http://llvm.org/viewvc/llvm-project?rev=147874&view=rev
Log:
Fix some leftover control reaches end of non-void function warnings.
Modified:
llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp
llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp
llvm/trunk/lib/Target/Sparc/Sparc.h
llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp
Modified: llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp?rev=147874&r1=147873&r2=147874&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp (original)
+++ llvm/trunk/lib/MC/MCDisassembler/EDDisassembler.cpp Tue Jan 10 14:47:20 2012
@@ -79,19 +79,18 @@
case EDDisassembler::kEDAssemblySyntaxX86ATT:
if (arch == Triple::x86 || arch == Triple::x86_64)
return 0;
- else
- return -1;
+ break;
case EDDisassembler::kEDAssemblySyntaxX86Intel:
if (arch == Triple::x86 || arch == Triple::x86_64)
return 1;
- else
- return -1;
+ break;
case EDDisassembler::kEDAssemblySyntaxARMUAL:
if (arch == Triple::arm || arch == Triple::thumb)
return 0;
- else
- return -1;
+ break;
}
+
+ return -1;
}
EDDisassembler *EDDisassembler::getDisassembler(Triple::ArchType arch,
Modified: llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp?rev=147874&r1=147873&r2=147874&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXSubtarget.cpp Tue Jan 10 14:47:20 2012
@@ -64,4 +64,5 @@
case PTX_VERSION_2_2: return "2.2";
case PTX_VERSION_2_3: return "2.3";
}
+ llvm_unreachable("Invalid PTX version");
}
Modified: llvm/trunk/lib/Target/Sparc/Sparc.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/Sparc.h?rev=147874&r1=147873&r2=147874&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/Sparc.h (original)
+++ llvm/trunk/lib/Target/Sparc/Sparc.h Tue Jan 10 14:47:20 2012
@@ -18,7 +18,6 @@
#include "MCTargetDesc/SparcMCTargetDesc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetMachine.h"
-#include <cassert>
namespace llvm {
class FunctionPass;
@@ -102,7 +101,8 @@
case SPCC::FCC_LE: return "le";
case SPCC::FCC_ULE: return "ule";
case SPCC::FCC_O: return "o";
- }
+ }
+ llvm_unreachable("Invalid cond code");
}
} // end namespace llvm
#endif
Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=147874&r1=147873&r2=147874&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp Tue Jan 10 14:47:20 2012
@@ -109,6 +109,7 @@
case SPCC::FCC_NE: return SPCC::FCC_E;
case SPCC::FCC_E: return SPCC::FCC_NE;
}
+ llvm_unreachable("Invalid cond code");
}
MachineInstr *
More information about the llvm-commits
mailing list