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 | a2886c21d9a08d63c324cc61aa91ae0893507a31 (patch) | |
tree | 26343892cf0ad93e83448d53dc0448e7ad413412 /llvm/lib/Support/Triple.cpp | |
parent | a767941651945183cc3665173fd850a6b057c018 (diff) | |
download | bcm5719-llvm-a2886c21d9a08d63c324cc61aa91ae0893507a31.tar.gz bcm5719-llvm-a2886c21d9a08d63c324cc61aa91ae0893507a31.zip |
Convert assert(0) to llvm_unreachable
llvm-svn: 149967
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
-rw-r--r-- | llvm/lib/Support/Triple.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index 7c4da12bfe7..f400c9969f5 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/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) |