From fde3e045d4dcc5c404cb4216389e18b0e720b8e0 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Thu, 13 Aug 2026 12:55:12 +0800 Subject: [IR] Split LL parsing, assembly writing, and data layout --- backend/include/rcc/MIR/LLVMConstantSyntax.h | 52 ---------------------------- 1 file changed, 52 deletions(-) delete mode 100644 backend/include/rcc/MIR/LLVMConstantSyntax.h (limited to 'backend/include/rcc/MIR/LLVMConstantSyntax.h') diff --git a/backend/include/rcc/MIR/LLVMConstantSyntax.h b/backend/include/rcc/MIR/LLVMConstantSyntax.h deleted file mode 100644 index 7e18d60..0000000 --- a/backend/include/rcc/MIR/LLVMConstantSyntax.h +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef RCC_MIR_LLVMCONSTANTSYNTAX_H -#define RCC_MIR_LLVMCONSTANTSYNTAX_H - -#include "rcc/CodeGen/GenericConstant.h" -#include "rcc/CodeGen/MachineIRTypes.h" -#include "rcc/Support/Error.h" - -#include -#include -#include -#include -#include - -namespace rcc::mir { - -struct LLVMNamedTypeDefinition final { - std::string_view Name; - std::string_view Definition; - bool NumericName = false; -}; - -struct LLVMConstantSyntaxOptions final { - std::string_view DataLayout; - std::span NamedTypes; - std::size_t MaximumDepth = 1024; - std::size_t MaximumNodes = std::size_t{1} << 24U; - std::size_t MaximumTokenLength = std::size_t{1} << 24U; -}; - -[[nodiscard]] Expected -parseLLVMConstant(std::string_view Text, LLVMConstantSyntaxOptions Options = {}); - -[[nodiscard]] Expected parseLLVMType(std::string_view Text, - LLVMConstantSyntaxOptions Options = {}); - -[[nodiscard]] Expected printLLVMConstant(const GenericConstantData &Constant); - -[[nodiscard]] Expected -llvmConstantStorageSize(const GenericConstantType &Type, LLVMConstantSyntaxOptions Options = {}); - -[[nodiscard]] Expected -llvmConstantPreferredAlignment(const GenericConstantType &Type, - LLVMConstantSyntaxOptions Options = {}); - -[[nodiscard]] Expected llvmPointerSizeInBits(std::uint32_t AddressSpace, - LLVMConstantSyntaxOptions Options = {}); - -} // namespace rcc::mir - -#endif // RCC_MIR_LLVMCONSTANTSYNTAX_H -- cgit v1.2.3