summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/ConstantFold.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-14 16:55:14 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-14 16:55:14 +0000
commitfbcc663cbf9e42e833883b89c0b976c92095562d (patch)
treeefa728e2a1e6f6b1bb0ec2a17b60476530e40f61 /llvm/lib/VMCore/ConstantFold.cpp
parent88719a1dd6e7e810f32c077cf694b8c79a4bd009 (diff)
downloadbcm5719-llvm-fbcc663cbf9e42e833883b89c0b976c92095562d.tar.gz
bcm5719-llvm-fbcc663cbf9e42e833883b89c0b976c92095562d.zip
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
Diffstat (limited to 'llvm/lib/VMCore/ConstantFold.cpp')
-rw-r--r--llvm/lib/VMCore/ConstantFold.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 4a5c2247b3c..7b10f444913 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -313,7 +313,7 @@ Constant *llvm::ConstantFoldCastInstruction(LLVMContext &Context,
break;
}
- LLVM_UNREACHABLE("Failed to cast constant expression");
+ llvm_unreachable("Failed to cast constant expression");
return 0;
}
@@ -1418,7 +1418,7 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context,
APInt V1 = cast<ConstantInt>(C1)->getValue();
APInt V2 = cast<ConstantInt>(C2)->getValue();
switch (pred) {
- default: LLVM_UNREACHABLE("Invalid ICmp Predicate"); return 0;
+ default: llvm_unreachable("Invalid ICmp Predicate"); return 0;
case ICmpInst::ICMP_EQ:
return Context.getConstantInt(Type::Int1Ty, V1 == V2);
case ICmpInst::ICMP_NE:
@@ -1445,7 +1445,7 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context,
APFloat C2V = cast<ConstantFP>(C2)->getValueAPF();
APFloat::cmpResult R = C1V.compare(C2V);
switch (pred) {
- default: LLVM_UNREACHABLE("Invalid FCmp Predicate"); return 0;
+ default: llvm_unreachable("Invalid FCmp Predicate"); return 0;
case FCmpInst::FCMP_FALSE: return Context.getConstantIntFalse();
case FCmpInst::FCMP_TRUE: return Context.getConstantIntTrue();
case FCmpInst::FCMP_UNO:
@@ -1502,7 +1502,7 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context,
if (C1->getType()->isFloatingPoint()) {
int Result = -1; // -1 = unknown, 0 = known false, 1 = known true.
switch (evaluateFCmpRelation(Context, C1, C2)) {
- default: LLVM_UNREACHABLE("Unknown relation!");
+ default: llvm_unreachable("Unknown relation!");
case FCmpInst::FCMP_UNO:
case FCmpInst::FCMP_ORD:
case FCmpInst::FCMP_UEQ:
@@ -1561,7 +1561,7 @@ Constant *llvm::ConstantFoldCompareInstruction(LLVMContext &Context,
// Evaluate the relation between the two constants, per the predicate.
int Result = -1; // -1 = unknown, 0 = known false, 1 = known true.
switch (evaluateICmpRelation(Context, C1, C2, CmpInst::isSigned(pred))) {
- default: LLVM_UNREACHABLE("Unknown relational!");
+ default: llvm_unreachable("Unknown relational!");
case ICmpInst::BAD_ICMP_PREDICATE:
break; // Couldn't determine anything about these constants.
case ICmpInst::ICMP_EQ: // We know the constants are equal!
OpenPOWER on IntegriCloud