diff options
Diffstat (limited to 'backend/include/rcc/CodeGen/GenericConstant.h')
| -rw-r--r-- | backend/include/rcc/CodeGen/GenericConstant.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/backend/include/rcc/CodeGen/GenericConstant.h b/backend/include/rcc/CodeGen/GenericConstant.h index 92a8f13..4219c24 100644 --- a/backend/include/rcc/CodeGen/GenericConstant.h +++ b/backend/include/rcc/CodeGen/GenericConstant.h @@ -3,8 +3,9 @@ #ifndef RCC_CODEGEN_GENERICCONSTANT_H #define RCC_CODEGEN_GENERICCONSTANT_H +#include "rcc/ADT/APFloat.h" +#include "rcc/ADT/APInt.h" #include "rcc/CodeGen/LowLevelType.h" -#include "rcc/CodeGen/MachineOperand.h" #include "rcc/Support/Error.h" #include <cstddef> @@ -144,8 +145,8 @@ private: struct GenericConstantData final { GenericConstantType Type; GenericConstantKind Kind = GenericConstantKind::Invalid; - std::optional<IntegerImmediate> IntegerValue; - std::optional<FloatingPointBits> FloatingValue; + std::optional<APInt> IntegerValue; + std::optional<APFloat> FloatingValue; std::vector<std::byte> ByteValue; std::vector<GenericConstantData> Elements; std::string Symbol; @@ -155,11 +156,11 @@ struct GenericConstantData final { GenericConstantExpressionOpcode ExpressionOpcode = GenericConstantExpressionOpcode::Invalid; GenericConstantExpressionFlags ExpressionFlags; std::optional<GenericConstantType> SourceElementType; - std::optional<IntegerImmediate> InRangeStart; - std::optional<IntegerImmediate> InRangeEnd; + std::optional<APInt> InRangeStart; + std::optional<APInt> InRangeEnd; - [[nodiscard]] static Expected<GenericConstantData> integer(IntegerImmediate Value); - [[nodiscard]] static Expected<GenericConstantData> floating(FloatingPointBits Value); + [[nodiscard]] static Expected<GenericConstantData> integer(APInt Value); + [[nodiscard]] static Expected<GenericConstantData> floating(APFloat Value); [[nodiscard]] static Expected<GenericConstantData> byteString(GenericConstantType Type, std::vector<std::byte> Bytes); |
