From d8d943929c25151fd6a8aadd6ea4cdbd5065845a Mon Sep 17 00:00:00 2001 From: Amlal Date: Wed, 7 May 2025 09:18:33 +0200 Subject: feat(LibCompiler): Reworking architecture to integrate the Arch() method in the AssemblyInterface. Signed-off-by: Amlal --- dev/LibCompiler/src/CCompilerARM64.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'dev/LibCompiler/src/CCompilerARM64.cc') diff --git a/dev/LibCompiler/src/CCompilerARM64.cc b/dev/LibCompiler/src/CCompilerARM64.cc index a992349..a5ddf43 100644 --- a/dev/LibCompiler/src/CCompilerARM64.cc +++ b/dev/LibCompiler/src/CCompilerARM64.cc @@ -142,7 +142,7 @@ class CompilerFrontendARM64 final : public LibCompiler::ICompilerFrontend { LIBCOMPILER_COPY_DEFAULT(CompilerFrontendARM64); std::string Check(const char* text, const char* file); - bool Compile(std::string text, const std::string file) override; + bool Compile(std::string text, std::string file) override; const char* Language() override { return "64k C"; } }; @@ -182,7 +182,7 @@ union double_cast final { ///////////////////////////////////////////////////////////////////////////////////////// -bool CompilerFrontendARM64::Compile(std::string text, const std::string file) { +bool CompilerFrontendARM64::Compile(std::string text, std::string file) { bool typeFound = false; bool fnFound = false; @@ -1049,13 +1049,11 @@ class AssemblyCCInterface final ASSEMBLY_INTERFACE { LIBCOMPILER_COPY_DEFAULT(AssemblyCCInterface); - [[maybe_unused]] static Int32 Arch() noexcept { + [[maybe_unused]] Int32 Arch() noexcept override { return LibCompiler::AssemblyFactory::kArchAARCH64; } Int32 CompileToFormat(std::string src, Int32 arch) override { - if (arch != AssemblyCCInterface::Arch()) return 1; - if (kCompilerFrontend == nullptr) return 1; /* @brief copy contents wihtout extension */ -- cgit v1.2.3