From 654c31b94d547e8d83be378eb5d5ab16a820dcdd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 4 Dec 2025 16:22:22 +0100 Subject: chore:: breaking structural changes of CompilerKit. The Kit has been redesigned to be expandable to new language frontends. Signed-off-by: Amlal El Mahrouss --- src/CompilerKit/Utilities/Compiler.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/CompilerKit/Utilities/Compiler.h') diff --git a/src/CompilerKit/Utilities/Compiler.h b/src/CompilerKit/Utilities/Compiler.h index 165ab53..bbca020 100644 --- a/src/CompilerKit/Utilities/Compiler.h +++ b/src/CompilerKit/Utilities/Compiler.h @@ -37,14 +37,18 @@ inline static UInt32 kAcceptableErrors = 0; inline static bool kVerbose = false; inline static bool kOutputAsBinary = false; -namespace Detail { -/// @brief Linker specific blob metadata structure -struct DynamicLinkerBlob final { +namespace CompilerKit::Detail { +/// @brief Blob structure +struct Blob final { std::vector mBlob{}; // PEF code/bss/data blob. UIntPtr mOffset{0UL}; // the offset of the PEF container header... + + explicit operator bool() { + return mBlob.empty() && mOffset > 0UL; + } }; -inline void print_error(std::string reason, std::string file) noexcept { +inline void print_error(STLString reason, STLString file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); kStdErr << reason << kBlank << std::endl; @@ -54,7 +58,7 @@ inline void print_error(std::string reason, std::string file) noexcept { ++kAcceptableErrors; } -inline void print_warning(std::string reason, std::string file) noexcept { +inline void print_warning(STLString reason, STLString file) noexcept { if (reason[0] == '\n') reason.erase(0, 1); kStdOut << kYellow << reason << kBlank << std::endl; -- cgit v1.2.3