[llvm-commits] [dragonegg] r150176 - in /dragonegg/trunk/src: Convert.cpp Types.cpp x86/Target.cpp
Duncan Sands
baldrick at free.fr
Thu Feb 9 06:42:05 PST 2012
Author: baldrick
Date: Thu Feb 9 08:42:05 2012
New Revision: 150176
URL: http://llvm.org/viewvc/llvm-project?rev=150176&view=rev
Log:
More "assert(false)" -> llvm_unreachable work.
Modified:
dragonegg/trunk/src/Convert.cpp
dragonegg/trunk/src/Types.cpp
dragonegg/trunk/src/x86/Target.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=150176&r1=150175&r2=150176&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Thu Feb 9 08:42:05 2012
@@ -1314,7 +1314,7 @@
V = CastToAnyType(V, VisSigned, IntTy, DestIsSigned);
return Builder.CreateBitCast(V, DestTy);
}
- assert(false && "Unable to cast between these types!");
+ llvm_unreachable("Unable to cast between these types!");
}
// The types are different so we must cast. Use getCastOpcode to create an
@@ -6196,7 +6196,7 @@
switch (code) {
default:
- assert(false && "Unhandled condition code!");
+ llvm_unreachable("Unhandled condition code!");
case LT_EXPR:
UIPred = CmpInst::ICMP_ULT;
SIPred = CmpInst::ICMP_SLT;
Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=150176&r1=150175&r2=150176&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Thu Feb 9 08:42:05 2012
@@ -104,7 +104,7 @@
switch (TREE_CODE(type_ref)) {
default:
- assert(false && "Unexpected tree kind!");
+ llvm_unreachable("Unexpected tree kind!");
case ARRAY_TYPE:
case COMPLEX_TYPE:
case POINTER_TYPE:
@@ -148,7 +148,7 @@
static ContainedTypeIterator begin(tree type) {
switch (TREE_CODE(type)) {
default:
- assert(false && "Unknown type!");
+ llvm_unreachable("Unknown type!");
case BOOLEAN_TYPE:
case ENUMERAL_TYPE:
@@ -1226,7 +1226,7 @@
assert(type == TYPE_MAIN_VARIANT(type) && "Not converting the main variant!");
switch (TREE_CODE(type)) {
default:
- assert(false && "Unknown type!");
+ llvm_unreachable("Unknown type!");
case BOOLEAN_TYPE:
case ENUMERAL_TYPE:
Modified: dragonegg/trunk/src/x86/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/Target.cpp?rev=150176&r1=150175&r2=150176&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/Target.cpp (original)
+++ dragonegg/trunk/src/x86/Target.cpp Thu Feb 9 08:42:05 2012
@@ -138,7 +138,7 @@
switch (Handler) {
case SearchForHandler:
- assert(false && "Unexpected builtin code!");
+ DieAbjectly("Unexpected builtin code!", stmt);
case UnsupportedBuiltin: return false;
case addps:
case addps256:
@@ -884,8 +884,7 @@
Result = Builder.CreateSExt(Result, ResultType);
return true;
}
- DieAbjectly("Builtin not implemented!", stmt);
- return false;
+ llvm_unreachable("Forgot case for code?");
}
// One day we will do parameter marshalling right: by using CUMULATIVE_ARGS.
More information about the llvm-commits
mailing list