summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-02-05 07:21:30 +0000
committerCraig Topper <craig.topper@gmail.com>2012-02-05 07:21:30 +0000
commitc4965bce14249ad13bd532af827bdd5c21b340fd (patch)
treecdc8568e020979b5affecad496677f065e6192d7 /llvm/utils/TableGen/IntrinsicEmitter.cpp
parentf9c1291fdedc22bf77d1a9cdba1da575bec3baf1 (diff)
downloadbcm5719-llvm-c4965bce14249ad13bd532af827bdd5c21b340fd.tar.gz
bcm5719-llvm-c4965bce14249ad13bd532af827bdd5c21b340fd.zip
Convert assert(0) to llvm_unreachable
llvm-svn: 149814
Diffstat (limited to 'llvm/utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/IntrinsicEmitter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp
index 657988b3f82..228d9297072 100644
--- a/llvm/utils/TableGen/IntrinsicEmitter.cpp
+++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp
@@ -320,7 +320,7 @@ void IntrinsicEmitter::EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
OS << "// Verifier::visitIntrinsicFunctionCall code.\n";
OS << "#ifdef GET_INTRINSIC_VERIFIER\n";
OS << " switch (ID) {\n";
- OS << " default: assert(0 && \"Invalid intrinsic!\");\n";
+ OS << " default: llvm_unreachable(\"Invalid intrinsic!\");\n";
// This checking can emit a lot of very common code. To reduce the amount of
// code that we emit, batch up cases that have identical types. This avoids
@@ -416,7 +416,7 @@ void IntrinsicEmitter::EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
OS << "// Code for generating Intrinsic function declarations.\n";
OS << "#ifdef GET_INTRINSIC_GENERATOR\n";
OS << " switch (id) {\n";
- OS << " default: assert(0 && \"Invalid intrinsic!\");\n";
+ OS << " default: llvm_unreachable(\"Invalid intrinsic!\");\n";
// Similar to GET_INTRINSIC_VERIFIER, batch up cases that have identical
// types.
@@ -485,8 +485,7 @@ namespace {
case CodeGenIntrinsic::ReadWriteMem:
return MRK_none;
}
- assert(0 && "bad mod-ref kind");
- return MRK_none;
+ llvm_unreachable("bad mod-ref kind");
}
struct AttributeComparator {
OpenPOWER on IntegriCloud