fix a build problem with VC++, PR5664, patch by Alp Toker!
authorChris Lattner <sabre@nondot.org>
Thu, 3 Dec 2009 06:58:32 +0000 (06:58 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 3 Dec 2009 06:58:32 +0000 (06:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90419 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMBaseInstrInfo.cpp

index 6e476a6e62bf2cf03490b20ab44f43c540c53004..15ee77bb417b62e1c40cffe57d5829c0eae734dd 100644 (file)
@@ -418,11 +418,13 @@ bool ARMBaseInstrInfo::isPredicable(MachineInstr *MI) const {
   return true;
 }
 
-/// FIXME: Works around a gcc miscompilation with -fstrict-aliasing
+/// FIXME: Works around a gcc miscompilation with -fstrict-aliasing.
+DISABLE_INLINE
 static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
-                                unsigned JTI) DISABLE_INLINE;
+                                unsigned JTI);
 static unsigned getNumJTEntries(const std::vector<MachineJumpTableEntry> &JT,
                                 unsigned JTI) {
+  assert(JTI < JT.size());
   return JT[JTI].MBBs.size();
 }