summaryrefslogtreecommitdiffhomepage
path: root/dev/CompilerKit
diff options
context:
space:
mode:
author0xf00sec <159052166+0xf00sec@users.noreply.github.com>2025-08-08 13:16:24 +0300
committerGitHub <noreply@github.com>2025-08-08 13:16:24 +0300
commit870e0e02f171f2f77057fe0d02627214a4f09ae1 (patch)
treefb8a962e4e88ada8bfbff44104f457f65d1e57fd /dev/CompilerKit
parentafd704793a8779642094202fe6ac8acf9073140b (diff)
:)
Signed-off-by: 0xf00sec <159052166+0xf00sec@users.noreply.github.com>
Diffstat (limited to 'dev/CompilerKit')
-rw-r--r--dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc
index 5897030..c31a81c 100644
--- a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc
+++ b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc
@@ -10,7 +10,7 @@
/// BUGS: 0
#define kPrintF printf
-#define kStdErr std::cerr
+#define kPrintErr std::cerr
#define kExitOK (EXIT_SUCCESS)
#define kExitNO (EXIT_FAILURE)
@@ -91,16 +91,7 @@ struct CompilerState final {
/// @param reason the reason of the error.
/// @param file where does it originate from?
void print_error(const CompilerKit::STLString& reason, const CompilerKit::STLString& file) noexcept {
- kStdErr << kRed << "Error in " << file << ": " << reason << kWhite << std::endl;
-}
-
-/// @brief crash handler for segmentation faults
-/// @param signal the signal number
-void drvi_crash_handler(int signal) noexcept {
- kStdErr << kRed << "Compiler crashed with signal: " << signal << kWhite << std::endl;
- kStdErr << "Last file: " << kState.fLastFile << std::endl;
- kStdErr << "Last error: " << kState.fLastError << std::endl;
- std::exit(EXIT_FAILURE);
+ kPrintErr << kRed << "Error in " << file << ": " << reason << kWhite << std::endl;
}
} // namespace Detail
@@ -833,7 +824,7 @@ NECTI_MODULE(CompilerCPlusPlusAMD64) {
kCompilerFrontend = nullptr;
});
- CompilerKit::install_signal(SIGSEGV, Detail::drvi_crash_handler);
+
for (auto index = 1UL; index < argc; ++index) {
if (!argv[index]) break;