summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
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/Transforms/IPO
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/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp8
-rw-r--r--llvm/lib/Transforms/IPO/MergeFunctions.cpp6
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 1b8db42bcac..398f78a0984 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -883,7 +883,7 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
Value *LV = new LoadInst(InitBool, InitBool->getName()+".val", CI);
InitBoolUsed = true;
switch (CI->getPredicate()) {
- default: LLVM_UNREACHABLE("Unknown ICmp Predicate!");
+ default: llvm_unreachable("Unknown ICmp Predicate!");
case ICmpInst::ICMP_ULT:
case ICmpInst::ICMP_SLT:
LV = Context->getConstantIntFalse(); // X < null -> always false
@@ -1164,7 +1164,7 @@ static Value *GetHeapSROAValue(Value *V, unsigned FieldNo,
PN->getName()+".f"+utostr(FieldNo), PN);
PHIsToRewrite.push_back(std::make_pair(PN, FieldNo));
} else {
- LLVM_UNREACHABLE("Unknown usable value");
+ llvm_unreachable("Unknown usable value");
Result = 0;
}
@@ -2057,7 +2057,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i)
Elts.push_back(Context->getUndef(STy->getElementType(i)));
} else {
- LLVM_UNREACHABLE("This code is out of sync with "
+ llvm_unreachable("This code is out of sync with "
" ConstantFoldLoadThroughGEPConstantExpr");
}
@@ -2085,7 +2085,7 @@ static Constant *EvaluateStoreInto(Constant *Init, Constant *Val,
Constant *Elt = Context->getUndef(ATy->getElementType());
Elts.assign(ATy->getNumElements(), Elt);
} else {
- LLVM_UNREACHABLE("This code is out of sync with "
+ llvm_unreachable("This code is out of sync with "
" ConstantFoldLoadThroughGEPConstantExpr");
}
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
index 31e36d8994c..9cc4daa9d26 100644
--- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp
+++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp
@@ -129,7 +129,7 @@ static bool isEquivalentType(const Type *Ty1, const Type *Ty2) {
return false;
default:
- LLVM_UNREACHABLE("Unknown type!");
+ llvm_unreachable("Unknown type!");
return false;
case Type::PointerTyID: {
@@ -470,7 +470,7 @@ static LinkageCategory categorize(const Function *F) {
return ExternalStrong;
}
- LLVM_UNREACHABLE("Unknown LinkageType.");
+ llvm_unreachable("Unknown LinkageType.");
return ExternalWeak;
}
@@ -576,7 +576,7 @@ static bool fold(std::vector<Function *> &FnVec, unsigned i, unsigned j) {
case Internal:
switch (catG) {
case ExternalStrong:
- llvm_unreachable();
+ llvm_unreachable(0);
// fall-through
case ExternalWeak:
if (F->hasAddressTaken())
OpenPOWER on IntegriCloud