2020-02-25 23:11:52 +08:00
|
|
|
//===-- lib/Evaluate/integer.cpp ------------------------------------------===//
|
2018-06-02 02:48:31 +08:00
|
|
|
//
|
2019-12-21 04:52:07 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2018-06-02 02:48:31 +08:00
|
|
|
//
|
2020-01-11 04:12:03 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2018-06-02 02:48:31 +08:00
|
|
|
|
2020-02-25 23:11:52 +08:00
|
|
|
#include "flang/Evaluate/integer.h"
|
2018-06-02 02:48:31 +08:00
|
|
|
|
2018-06-13 03:59:31 +08:00
|
|
|
namespace Fortran::evaluate::value {
|
2018-06-02 02:48:31 +08:00
|
|
|
|
|
|
|
template class Integer<8>;
|
|
|
|
template class Integer<16>;
|
|
|
|
template class Integer<32>;
|
|
|
|
template class Integer<64>;
|
2018-06-13 06:14:18 +08:00
|
|
|
template class Integer<80>;
|
2018-06-02 02:48:31 +08:00
|
|
|
template class Integer<128>;
|
|
|
|
|
2018-06-13 03:59:31 +08:00
|
|
|
// Sanity checks against misconfiguration bugs
|
2018-06-02 02:48:31 +08:00
|
|
|
static_assert(Integer<8>::partBits == 8);
|
|
|
|
static_assert(std::is_same_v<typename Integer<8>::Part, std::uint8_t>);
|
|
|
|
static_assert(Integer<16>::partBits == 16);
|
|
|
|
static_assert(std::is_same_v<typename Integer<16>::Part, std::uint16_t>);
|
|
|
|
static_assert(Integer<32>::partBits == 32);
|
|
|
|
static_assert(std::is_same_v<typename Integer<32>::Part, std::uint32_t>);
|
|
|
|
static_assert(Integer<64>::partBits == 32);
|
|
|
|
static_assert(std::is_same_v<typename Integer<64>::Part, std::uint32_t>);
|
|
|
|
static_assert(Integer<128>::partBits == 32);
|
|
|
|
static_assert(std::is_same_v<typename Integer<128>::Part, std::uint32_t>);
|
2020-03-29 12:00:16 +08:00
|
|
|
} // namespace Fortran::evaluate::value
|