From: Matt Beaumont-Gay Date: Wed, 14 Nov 2012 17:58:11 +0000 (+0000) Subject: s/assert/llvm_unreachable/ X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fc2002c9330c66a73db17de1292e90568fd6938;p=platform%2Fupstream%2Fllvm.git s/assert/llvm_unreachable/ llvm-svn: 167936 --- diff --git a/llvm/lib/Object/Archive.cpp b/llvm/lib/Object/Archive.cpp index 12ec3ce..5b1e007 100644 --- a/llvm/lib/Object/Archive.cpp +++ b/llvm/lib/Object/Archive.cpp @@ -13,6 +13,7 @@ #include "llvm/Object/Archive.h" #include "llvm/ADT/APInt.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Endian.h" #include "llvm/Support/MemoryBuffer.h" @@ -272,7 +273,7 @@ error_code Archive::Symbol::getMember(child_iterator &Result) const { Offset = *(reinterpret_cast(Offsets) + SymbolIndex); } else if (Parent->kind() == K_BSD) { - assert(0 && "BSD format is not supported"); + llvm_unreachable("BSD format is not supported"); } else { uint32_t MemberCount = *reinterpret_cast(Buf); @@ -327,7 +328,7 @@ Archive::symbol_iterator Archive::begin_symbols() const { symbol_count = *reinterpret_cast(buf); buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint32_t))); } else if (kind() == K_BSD) { - assert(0 && "BSD archive format is not supported"); + llvm_unreachable("BSD archive format is not supported"); } else { uint32_t member_count = 0; uint32_t symbol_count = 0; @@ -348,7 +349,7 @@ Archive::symbol_iterator Archive::end_symbols() const { symbol_count = *reinterpret_cast(buf); buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint32_t))); } else if (kind() == K_BSD) { - assert(0 && "BSD archive format is not supported"); + llvm_unreachable("BSD archive format is not supported"); } else { uint32_t member_count = 0; member_count = *reinterpret_cast(buf);