llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index 9a49bfc..8ce40a9 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -536,11 +536,11 @@
/// Out-of-line ReturnInst method, put here so the C++ compiler can choose to
/// emit the vtable for the class in this translation unit.
void ReturnInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
- LLVM_UNREACHABLE("ReturnInst has no successors!");
+ llvm_unreachable("ReturnInst has no successors!");
}
BasicBlock *ReturnInst::getSuccessorV(unsigned idx) const {
- LLVM_UNREACHABLE("ReturnInst has no successors!");
+ llvm_unreachable("ReturnInst has no successors!");
return 0;
}
@@ -564,11 +564,11 @@
}
void UnwindInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
- LLVM_UNREACHABLE("UnwindInst has no successors!");
+ llvm_unreachable("UnwindInst has no successors!");
}
BasicBlock *UnwindInst::getSuccessorV(unsigned idx) const {
- LLVM_UNREACHABLE("UnwindInst has no successors!");
+ llvm_unreachable("UnwindInst has no successors!");
return 0;
}
@@ -588,11 +588,11 @@
}
void UnreachableInst::setSuccessorV(unsigned idx, BasicBlock *NewSucc) {
- LLVM_UNREACHABLE("UnwindInst has no successors!");
+ llvm_unreachable("UnwindInst has no successors!");
}
BasicBlock *UnreachableInst::getSuccessorV(unsigned idx) const {
- LLVM_UNREACHABLE("UnwindInst has no successors!");
+ llvm_unreachable("UnwindInst has no successors!");
return 0;
}
@@ -2298,7 +2298,7 @@
PTy = NULL;
return BitCast; // same size, no-op cast
} else {
- LLVM_UNREACHABLE("Casting pointer or non-first class to float");
+ llvm_unreachable("Casting pointer or non-first class to float");
}
} else if (const VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
if (const VectorType *SrcPTy = dyn_cast<VectorType>(SrcTy)) {
@@ -2709,7 +2709,7 @@
APInt Upper(C);
uint32_t BitWidth = C.getBitWidth();
switch (pred) {
- default: LLVM_UNREACHABLE("Invalid ICmp opcode to ConstantRange ctor!");
+ default: llvm_unreachable("Invalid ICmp opcode to ConstantRange ctor!");
case ICmpInst::ICMP_EQ: Upper++; break;
case ICmpInst::ICMP_NE: Lower++; break;
case ICmpInst::ICMP_ULT: Lower = APInt::getMinValue(BitWidth); break;