diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-02-07 05:05:23 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-02-07 05:05:23 +0000 |
commit | 858143816d43e58b17bfd11cb1b57afbd7f0f893 (patch) | |
tree | 661162864d8268b96d58b110187f87a8523f0f65 /lib/Support/Triple.cpp | |
parent | bc2198133a1836598b54b943420748e75d5dea94 (diff) |
Convert assert(0) to llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Triple.cpp')
-rw-r--r-- | lib/Support/Triple.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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) |