llvm.org GIT mirror llvm / fdebc38
Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8 David Blaikie 8 years ago
11 changed file(s) with 12 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
6060 *rECX = registers[2];
6161 *rEDX = registers[3];
6262 return false;
63 #else
64 return true;
6365 #endif
6466 #elif defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
6567 #if defined(__GNUC__)
8688 mov dword ptr [esi],edx
8789 }
8890 return false;
91 // pedantic #else returns to appease -Wunreachable-code (so we don't generate
92 // postprocessed code that looks like "return true; return false;")
93 #else
94 return true;
8995 #endif
90 #endif
96 #else
9197 return true;
98 #endif
9299 }
93100
94101 static void DetectX86FamilyModel(unsigned EAX, unsigned &Family,
18851885 }
18861886
18871887 llvm_unreachable("Invalid dependence flavor");
1888 return true;
18891888 }
18901889
18911890 /// FindDependencies - Walk up the CFG from StartPos (which is in StartBB) and
248248 if (Term->getSuccessor(i) == Succ)
249249 return i;
250250 }
251 return 0;
252251 }
253252
254253 /// SplitEdge - Split the edge connecting specified block. Pass P must
5858 // True -> 7
5959 default:
6060 llvm_unreachable("Invalid ICmp predicate!");
61 return 0;
6261 }
6362 }
6463
457457 return new CompareConstantExpr(Ty, Instruction::FCmp, V.subclassdata,
458458 V.operands[0], V.operands[1]);
459459 llvm_unreachable("Invalid ConstantExpr!");
460 return 0;
461460 }
462461 };
463462
10911091 return LLVMCommonLinkage;
10921092 }
10931093
1094 // Should never get here.
1095 return static_cast(0);
1094 llvm_unreachable("Make GCC's unreachability happy");
10961095 }
10971096
10981097 void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage) {
165165
166166 default: return " ";
167167 }
168
169 return 0;
170168 }
171169
172170 /// isIdenticalTo - Return true if the specified instruction is exactly
525525 case AC_EDisassemble:
526526 return DisassembleInput(argv[0], true);
527527 }
528
529 return 0;
530 }
528 }
162162 case AC_Execute:
163163 return executeInput();
164164 }
165
166 return 0;
167165 }
1717 #include "llvm/ADT/StringExtras.h"
1818 #include "llvm/ADT/STLExtras.h"
1919 #include "llvm/Support/Debug.h"
20 #include "llvm/Support/ErrorHandling.h"
2021 #include
2122 #include
2223 using namespace llvm;
911912 EnforceVectorSubVectorTypeIs(NodeToApply->getExtType(ResNo), TP);
912913 }
913914 }
914 return false;
915 llvm_unreachable("Make GCC's unreachability happy");
915916 }
916917
917918 //===----------------------------------------------------------------------===//
101101 return false;
102102 default:
103103 llvm_unreachable("Unknown instruction class");
104 return false;
105104 }
106105 }
107106