diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-01-05 10:15:49 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-01-05 10:15:49 +0000 |
commit | d3c02f177a878167f7155d1cc3967bdf681ae36d (patch) | |
tree | 956b82b101c43f1e38dfdeacc570b022737b09aa /llvm/lib/CodeGen | |
parent | 40c1b352921c8a3fb3718b8015243121bb32b986 (diff) | |
download | bcm5719-llvm-d3c02f177a878167f7155d1cc3967bdf681ae36d.tar.gz bcm5719-llvm-d3c02f177a878167f7155d1cc3967bdf681ae36d.zip |
Replace several 'assert(false' with 'llvm_unreachable' or fold a condition into the assert.
llvm-svn: 225160
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/JumpInstrTables.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 55a46377529..51ea7db30ba 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -3970,7 +3970,8 @@ void VectorPromoteHelper::promoteImpl(Instruction *ToBePromoted) { isa<UndefValue>(Val) || canCauseUndefinedBehavior(ToBePromoted, U.getOperandNo())); } else - assert(0 && "Did you modified shouldPromote and forgot to update this?"); + llvm_unreachable("Did you modified shouldPromote and forgot to update " + "this?"); ToBePromoted->setOperand(U.getOperandNo(), NewVal); } Transition->removeFromParent(); diff --git a/llvm/lib/CodeGen/JumpInstrTables.cpp b/llvm/lib/CodeGen/JumpInstrTables.cpp index 20f775c1245..bc796ed4841 100644 --- a/llvm/lib/CodeGen/JumpInstrTables.cpp +++ b/llvm/lib/CodeGen/JumpInstrTables.cpp @@ -117,8 +117,8 @@ bool replaceGlobalValueIndirectUse(GlobalValue *GV, Value *V, Use *U) { if (!isa<GlobalAlias>(C)) C->replaceUsesOfWithOnConstant(GV, V, U); } else { - assert(false && "The Use of a Function symbol is neither an instruction nor" - " a constant"); + llvm_unreachable("The Use of a Function symbol is neither an instruction " + "nor a constant"); } return true; diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 5a6ea8e6810..74769e54f8a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -9735,7 +9735,7 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) { } else if (ConstantFPSDNode *C = dyn_cast<ConstantFPSDNode>(Val)) { StoreInt|= C->getValueAPF().bitcastToAPInt().zext(StoreBW); } else { - assert(false && "Invalid constant element type"); + llvm_unreachable("Invalid constant element type"); } } |