| 1 |
//===-- lib/Evaluate/integer.cpp ------------------------------------------===// |
| 2 |
// |
| 3 |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 |
// See https://llvm.org/LICENSE.txt for license information. |
| 5 |
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 |
// |
| 7 |
//===----------------------------------------------------------------------===// |
| 8 |
|
| 9 |
#include "flang/Evaluate/integer.h" |
| 10 |
|
| 11 |
namespace Fortran::evaluate::value { |
| 12 |
|
| 13 |
template class Integer<8>; |
| 14 |
template class Integer<16>; |
| 15 |
template class Integer<32>; |
| 16 |
template class Integer<64>; |
| 17 |
template class Integer<80, true, 16, std::uint16_t, std::uint32_t, 128>; |
| 18 |
template class Integer<128>; |
| 19 |
|
| 20 |
// Sanity checks against misconfiguration bugs |
| 21 |
static_assert(Integer<8>::partBits == 8); |
| 22 |
static_assert(std::is_same_v<typename Integer<8>::Part, std::uint8_t>); |
| 23 |
static_assert(Integer<16>::partBits == 16); |
| 24 |
static_assert(std::is_same_v<typename Integer<16>::Part, std::uint16_t>); |
| 25 |
static_assert(Integer<32>::partBits == 32); |
| 26 |
static_assert(std::is_same_v<typename Integer<32>::Part, std::uint32_t>); |
| 27 |
static_assert(Integer<64>::partBits == 32); |
| 28 |
static_assert(std::is_same_v<typename Integer<64>::Part, std::uint32_t>); |
| 29 |
static_assert(Integer<128>::partBits == 32); |
| 30 |
static_assert(std::is_same_v<typename Integer<128>::Part, std::uint32_t>); |
| 31 |
} // namespace Fortran::evaluate::value |