summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/ConstantRange.cpp2
-rw-r--r--lib/Support/Triple.cpp5
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 0432921b87..5206cf1f9b 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -55,7 +55,7 @@ ConstantRange ConstantRange::makeICmpRegion(unsigned Pred,
uint32_t W = CR.getBitWidth();
switch (Pred) {
- default: assert(0 && "Invalid ICmp predicate to makeICmpRegion()");
+ default: llvm_unreachable("Invalid ICmp predicate to makeICmpRegion()");
case CmpInst::ICMP_EQ:
return CR;
case CmpInst::ICMP_NE:
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index 7c4da12bfe..f400c9969f 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -459,8 +459,7 @@ std::string Triple::normalize(StringRef Str) {
bool Valid = false;
StringRef Comp = Components[Idx];
switch (Pos) {
- default:
- assert(false && "unexpected component type!");
+ default: llvm_unreachable("unexpected component type!");
case 0:
Arch = ParseArch(Comp);
Valid = Arch != UnknownArch;
@@ -618,7 +617,7 @@ bool Triple::getMacOSXVersion(unsigned &Major, unsigned &Minor,
getOSVersion(Major, Minor, Micro);
switch (getOS()) {
- default: assert(0 && "unexpected OS for Darwin triple");
+ default: llvm_unreachable("unexpected OS for Darwin triple");
case Darwin:
// Default to darwin8, i.e., MacOSX 10.4.
if (Major == 0)