mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Convert assert(0) to llvm_unreachable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,12 +14,12 @@
|
||||
#ifndef LLVM_ADT_BITVECTOR_H
|
||||
#define LLVM_ADT_BITVECTOR_H
|
||||
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
else if (sizeof(BitWord) == 8)
|
||||
NumBits += CountPopulation_64(Bits[i]);
|
||||
else
|
||||
assert(0 && "Unsupported!");
|
||||
llvm_unreachable("Unsupported!");
|
||||
return NumBits;
|
||||
}
|
||||
|
||||
@@ -146,10 +146,9 @@ public:
|
||||
if (Bits[i] != 0) {
|
||||
if (sizeof(BitWord) == 4)
|
||||
return i * BITWORD_SIZE + CountTrailingZeros_32((uint32_t)Bits[i]);
|
||||
else if (sizeof(BitWord) == 8)
|
||||
if (sizeof(BitWord) == 8)
|
||||
return i * BITWORD_SIZE + CountTrailingZeros_64(Bits[i]);
|
||||
else
|
||||
assert(0 && "Unsupported!");
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -170,10 +169,9 @@ public:
|
||||
if (Copy != 0) {
|
||||
if (sizeof(BitWord) == 4)
|
||||
return WordPos * BITWORD_SIZE + CountTrailingZeros_32((uint32_t)Copy);
|
||||
else if (sizeof(BitWord) == 8)
|
||||
if (sizeof(BitWord) == 8)
|
||||
return WordPos * BITWORD_SIZE + CountTrailingZeros_64(Copy);
|
||||
else
|
||||
assert(0 && "Unsupported!");
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
|
||||
// Check subsequent words.
|
||||
@@ -181,10 +179,9 @@ public:
|
||||
if (Bits[i] != 0) {
|
||||
if (sizeof(BitWord) == 4)
|
||||
return i * BITWORD_SIZE + CountTrailingZeros_32((uint32_t)Bits[i]);
|
||||
else if (sizeof(BitWord) == 8)
|
||||
if (sizeof(BitWord) == 8)
|
||||
return i * BITWORD_SIZE + CountTrailingZeros_64(Bits[i]);
|
||||
else
|
||||
assert(0 && "Unsupported!");
|
||||
llvm_unreachable("Unsupported!");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user