//===-- llvm/ADT/APSInt.h - Arbitrary Precision Signed Int -----*- C++ -*--===// // // 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 // //===----------------------------------------------------------------------===// /// /// \file /// This file implements the APSInt class, which is a simple class that /// represents an arbitrary sized integer that knows its signedness. /// //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_APSINT_H #define LLVM_ADT_APSINT_H #include "llvm/ADT/APInt.h" namespace llvm { /// An arbitrary precision integer that knows its signedness. class [[nodiscard]] APSInt : public APInt { … }; inline bool operator==(int64_t V1, const APSInt &V2) { … } inline bool operator!=(int64_t V1, const APSInt &V2) { … } inline bool operator<=(int64_t V1, const APSInt &V2) { … } inline bool operator>=(int64_t V1, const APSInt &V2) { … } inline bool operator<(int64_t V1, const APSInt &V2) { … } inline bool operator>(int64_t V1, const APSInt &V2) { … } inline raw_ostream &operator<<(raw_ostream &OS, const APSInt &I) { … } /// Provide DenseMapInfo for APSInt, using the DenseMapInfo for APInt. template <> struct DenseMapInfo<APSInt, void> { … }; } // end namespace llvm #endif