diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-23 05:06:16 +0000 |
commit | b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 (patch) | |
tree | 2b708dc00bedcc6a6204d29c915ac7fce8fb028f /lib/CodeGen/CGExprScalar.cpp | |
parent | c535d9730e11ca335790359bfbd4600be71c5410 (diff) |
Switch assert(0/false) llvm_unreachable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 01acd42a06..90e1232715 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -153,7 +153,7 @@ public: Value *VisitStmt(Stmt *S) { S->dump(CGF.getContext().getSourceManager()); - assert(0 && "Stmt can't have complex result type!"); + llvm_unreachable("Stmt can't have complex result type!"); return 0; } Value *VisitExpr(Expr *S); @@ -1266,7 +1266,7 @@ EmitAddConsiderOverflowBehavior(const UnaryOperator *E, return EmitOverflowCheckedBinOp(BinOp); break; } - assert(false && "Unknown SignedOverflowBehaviorTy"); + llvm_unreachable("Unknown SignedOverflowBehaviorTy"); return 0; } @@ -1780,7 +1780,7 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { IID = llvm::Intrinsic::smul_with_overflow; break; default: - assert(false && "Unsupported operation for overflow detection"); + llvm_unreachable("Unsupported operation for overflow detection"); IID = 0; } OpID <<= 1; @@ -2076,7 +2076,7 @@ enum IntrinsicType { VCMPEQ, VCMPGT }; static llvm::Intrinsic::ID GetIntrinsic(IntrinsicType IT, BuiltinType::Kind ElemKind) { switch (ElemKind) { - default: assert(0 && "unexpected element type"); + default: llvm_unreachable("unexpected element type"); case BuiltinType::Char_U: case BuiltinType::UChar: return (IT == VCMPEQ) ? llvm::Intrinsic::ppc_altivec_vcmpequb_p : @@ -2146,7 +2146,7 @@ Value *ScalarExprEmitter::EmitCompare(const BinaryOperator *E,unsigned UICmpOpc, BuiltinType::Kind ElementKind = BTy->getKind(); switch(E->getOpcode()) { - default: assert(0 && "is not a comparison operation"); + default: llvm_unreachable("is not a comparison operation"); case BO_EQ: CR6 = CR6_LT; ID = GetIntrinsic(VCMPEQ, ElementKind); @@ -2755,7 +2755,7 @@ LValue CodeGenFunction::EmitCompoundAssignmentLValue( case BO_LOr: case BO_Assign: case BO_Comma: - assert(false && "Not valid compound assignment operators"); + llvm_unreachable("Not valid compound assignment operators"); break; } |