diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/LibC++/lc_runtime.h | 13 | ||||
| -rw-r--r-- | dev/LibCompiler/src/CPlusPlusCompilerPreProcessor.cc | 14 |
2 files changed, 27 insertions, 0 deletions
diff --git a/dev/LibC++/lc_runtime.h b/dev/LibC++/lc_runtime.h new file mode 100644 index 0000000..c98fefe --- /dev/null +++ b/dev/LibC++/lc_runtime.h @@ -0,0 +1,13 @@ +/* ------------------------------------------- + \ + Copyright (C) 2024-2025 Amlal EL Mahrouss, all rights reserved. \ + \ +------------------------------------------- */ + +#pragma once + +#ifdef __cplusplus + +extern "C" void __cxx_libcompiler_unreachable(void); + +#endif
\ No newline at end of file diff --git a/dev/LibCompiler/src/CPlusPlusCompilerPreProcessor.cc b/dev/LibCompiler/src/CPlusPlusCompilerPreProcessor.cc index 2d4c11a..1986d61 100644 --- a/dev/LibCompiler/src/CPlusPlusCompilerPreProcessor.cc +++ b/dev/LibCompiler/src/CPlusPlusCompilerPreProcessor.cc @@ -922,6 +922,13 @@ LIBCOMPILER_MODULE(CPlusPlusPreprocessorMain) kMacros.push_back(macro_1); + Detail::bpp_macro macro_unreachable; + + macro_unreachable.fName = "__unreachable"; + macro_unreachable.fValue = "__cxx_libcompiler_unreachable"; + + kMacros.push_back(macro_unreachable); + Detail::bpp_macro macro_0; macro_0.fName = "__false"; @@ -936,6 +943,13 @@ LIBCOMPILER_MODULE(CPlusPlusPreprocessorMain) kMacros.push_back(macro_zka); + Detail::bpp_macro macro_cxx; + + macro_cxx.fName = "__cplusplus"; + macro_cxx.fValue = "202302L"; + + kMacros.push_back(macro_cxx); + Detail::bpp_macro macro_size_t; macro_size_t.fName = "__SIZE_TYPE__"; macro_size_t.fValue = "unsigned long long int"; |
