diff --git a/build1.bat b/build1.bat index 40d25f06107..c406565aebc 100644 --- a/build1.bat +++ b/build1.bat @@ -1,9 +1,10 @@ cmake ^ -DCMAKE_BUILD_TYPE=Release ^ -DWITH_LLVM=yes ^ - -DLFORTRAN_BUILD_ALL=yes ^ + -DLPYTHON_BUILD_ALL=yes ^ -DWITH_STACKTRACE=no ^ -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" ^ -DCMAKE_INSTALL_PREFIX=%cd%/inst ^ . + cmake --build . --config Release -j8 --target install diff --git a/src/bin/lpython.cpp b/src/bin/lpython.cpp index f9bf7435c49..32cc566e04c 100644 --- a/src/bin/lpython.cpp +++ b/src/bin/lpython.cpp @@ -1181,7 +1181,7 @@ EMSCRIPTEN_KEEPALIVE char* emit_wasm_from_source(char *input) { int main(int argc, char *argv[]) { LCompilers::initialize(); -#if defined(HAVE_LFORTRAN_STACKTRACE) +#if defined(HAVE_LCOMPILERS_STACKTRACE) LCompilers::print_stack_on_segfault(); #endif try { diff --git a/src/libasr/alloc.h b/src/libasr/alloc.h index 76588a28844..903a566883d 100644 --- a/src/libasr/alloc.h +++ b/src/libasr/alloc.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PARSER_ALLOC_H -#define LFORTRAN_PARSER_ALLOC_H +#ifndef LIBASR_PARSER_ALLOC_H +#define LIBASR_PARSER_ALLOC_H #include #include diff --git a/src/libasr/asdl_cpp.py b/src/libasr/asdl_cpp.py index 032d61763b8..f35d27d7d74 100644 --- a/src/libasr/asdl_cpp.py +++ b/src/libasr/asdl_cpp.py @@ -2133,8 +2133,8 @@ def add_masks(fields, node): self.optional_masks = optional_masks -HEAD = r"""#ifndef LFORTRAN_%(MOD2)s_H -#define LFORTRAN_%(MOD2)s_H +HEAD = r"""#ifndef LIBASR_%(MOD2)s_H +#define LIBASR_%(MOD2)s_H // Generated by grammar/asdl_cpp.py @@ -2190,7 +2190,7 @@ def add_masks(fields, node): FOOT = r"""} // namespace LCompilers::%(MOD)s -#endif // LFORTRAN_%(MOD2)s_H +#endif // LIBASR_%(MOD2)s_H """ visitors = [ASTNodeVisitor0, ASTNodeVisitor1, ASTNodeVisitor, diff --git a/src/libasr/asr_scopes.h b/src/libasr/asr_scopes.h index ddadb30fbfb..c0fbcaff10a 100644 --- a/src/libasr/asr_scopes.h +++ b/src/libasr/asr_scopes.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_SEMANTICS_ASR_SCOPES_H -#define LFORTRAN_SEMANTICS_ASR_SCOPES_H +#ifndef LIBASR_SEMANTICS_ASR_SCOPES_H +#define LIBASR_SEMANTICS_ASR_SCOPES_H #include @@ -84,4 +84,4 @@ struct SymbolTable { } // namespace LCompilers -#endif // LFORTRAN_SEMANTICS_ASR_SCOPES_H +#endif // LIBASR_SEMANTICS_ASR_SCOPES_H diff --git a/src/libasr/asr_utils.h b/src/libasr/asr_utils.h index 6642aac16fa..72b069b155f 100644 --- a/src/libasr/asr_utils.h +++ b/src/libasr/asr_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_UTILS_H -#define LFORTRAN_ASR_UTILS_H +#ifndef LIBASR_ASR_UTILS_H +#define LIBASR_ASR_UTILS_H #include #include @@ -2179,4 +2179,4 @@ static inline ASR::EnumType_t* get_EnumType_from_symbol(ASR::symbol_t* s) { } // namespace LCompilers -#endif // LFORTRAN_ASR_UTILS_H +#endif // LIBASR_ASR_UTILS_H diff --git a/src/libasr/asr_verify.h b/src/libasr/asr_verify.h index e7003ac590f..2b89233784b 100644 --- a/src/libasr/asr_verify.h +++ b/src/libasr/asr_verify.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_VERIFY_H -#define LFORTRAN_ASR_VERIFY_H +#ifndef LIBASR_ASR_VERIFY_H +#define LIBASR_ASR_VERIFY_H #include @@ -40,4 +40,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_VERIFY_H +#endif // LIBASR_ASR_VERIFY_H diff --git a/src/libasr/assert.h b/src/libasr/assert.h index e3274ce78d5..e64490419cc 100644 --- a/src/libasr/assert.h +++ b/src/libasr/assert.h @@ -55,7 +55,7 @@ #endif // defined(WITH_LCOMPILERS_ASSERT) -#define LFORTRAN_ERROR(description) \ +#define LCOMPILERS_ERROR(description) \ std::cerr << description; \ std::cerr << "\n"; \ abort(); diff --git a/src/libasr/bigint.h b/src/libasr/bigint.h index aaa4ceb262d..087e0f0cc53 100644 --- a/src/libasr/bigint.h +++ b/src/libasr/bigint.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_BIGINT_H -#define LFORTRAN_BIGINT_H +#ifndef LIBASR_BIGINT_H +#define LIBASR_BIGINT_H #include @@ -165,4 +165,4 @@ static_assert(sizeof(BigInt) == 8); } // namespace LCompilers -#endif // LFORTRAN_BIGINT_H +#endif // LIBASR_BIGINT_H diff --git a/src/libasr/bwriter.h b/src/libasr/bwriter.h index 0fc924af44c..ee24a22eb1c 100644 --- a/src/libasr/bwriter.h +++ b/src/libasr/bwriter.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_BWRITER_H -#define LFORTRAN_BWRITER_H +#ifndef LIBASR_BWRITER_H +#define LIBASR_BWRITER_H #include #include @@ -254,4 +254,4 @@ class TextReader } // namespace LCompilers -#endif // LFORTRAN_BWRITER_H +#endif // LIBASR_BWRITER_H diff --git a/src/libasr/codegen/asr_to_c.h b/src/libasr/codegen/asr_to_c.h index b78bfc25e6b..e33b642d441 100644 --- a/src/libasr/codegen/asr_to_c.h +++ b/src/libasr/codegen/asr_to_c.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_C_H -#define LFORTRAN_ASR_TO_C_H +#ifndef LIBASR_ASR_TO_C_H +#define LIBASR_ASR_TO_C_H #include #include @@ -12,4 +12,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_C_H +#endif // LIBASR_ASR_TO_C_H diff --git a/src/libasr/codegen/asr_to_c_cpp.h b/src/libasr/codegen/asr_to_c_cpp.h index ab49f2ff608..5891a60ba49 100644 --- a/src/libasr/codegen/asr_to_c_cpp.h +++ b/src/libasr/codegen/asr_to_c_cpp.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_C_CPP_H -#define LFORTRAN_ASR_TO_C_CPP_H +#ifndef LIBASR_ASR_TO_C_CPP_H +#define LIBASR_ASR_TO_C_CPP_H /* * Common code to be used in both of: @@ -1650,4 +1650,4 @@ R"(#include } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_C_CPP_H +#endif // LIBASR_ASR_TO_C_CPP_H diff --git a/src/libasr/codegen/asr_to_cpp.h b/src/libasr/codegen/asr_to_cpp.h index 58380852dd1..a47ba9c8aaa 100644 --- a/src/libasr/codegen/asr_to_cpp.h +++ b/src/libasr/codegen/asr_to_cpp.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_CPP_H -#define LFORTRAN_ASR_TO_CPP_H +#ifndef LIBASR_ASR_TO_CPP_H +#define LIBASR_ASR_TO_CPP_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_CPP_H +#endif // LIBASR_ASR_TO_CPP_H diff --git a/src/libasr/codegen/asr_to_julia.h b/src/libasr/codegen/asr_to_julia.h index bc9e86289bd..7f4ac00c517 100644 --- a/src/libasr/codegen/asr_to_julia.h +++ b/src/libasr/codegen/asr_to_julia.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_JULIA_H -#define LFORTRAN_ASR_TO_JULIA_H +#ifndef LIBASR_ASR_TO_JULIA_H +#define LIBASR_ASR_TO_JULIA_H #include #include @@ -13,4 +13,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_JULIA_H +#endif // LIBASR_ASR_TO_JULIA_H diff --git a/src/libasr/codegen/asr_to_llvm.h b/src/libasr/codegen/asr_to_llvm.h index a1e911e0c28..bea8159e1c2 100644 --- a/src/libasr/codegen/asr_to_llvm.h +++ b/src/libasr/codegen/asr_to_llvm.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_LLVM_H -#define LFORTRAN_ASR_TO_LLVM_H +#ifndef LIBASR_ASR_TO_LLVM_H +#define LIBASR_ASR_TO_LLVM_H #include #include @@ -17,4 +17,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_LLVM_H +#endif // LIBASR_ASR_TO_LLVM_H diff --git a/src/libasr/codegen/asr_to_py.h b/src/libasr/codegen/asr_to_py.h index 750057f7ffd..f9d0dad986f 100644 --- a/src/libasr/codegen/asr_to_py.h +++ b/src/libasr/codegen/asr_to_py.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_PY_H -#define LFORTRAN_ASR_TO_PY_H +#ifndef LIBASR_ASR_TO_PY_H +#define LIBASR_ASR_TO_PY_H #include #include @@ -10,4 +10,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_PY_H +#endif // LIBASR_ASR_TO_PY_H diff --git a/src/libasr/codegen/asr_to_wasm.h b/src/libasr/codegen/asr_to_wasm.h index e6456f67376..3eacc4c994c 100644 --- a/src/libasr/codegen/asr_to_wasm.h +++ b/src/libasr/codegen/asr_to_wasm.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_WASM_H -#define LFORTRAN_ASR_TO_WASM_H +#ifndef LIBASR_ASR_TO_WASM_H +#define LIBASR_ASR_TO_WASM_H #include @@ -17,4 +17,4 @@ Result asr_to_wasm(ASR::TranslationUnit_t &asr, Allocator &al, } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_WASM_H +#endif // LIBASR_ASR_TO_WASM_H diff --git a/src/libasr/codegen/asr_to_x86.h b/src/libasr/codegen/asr_to_x86.h index 415e663a4e0..0110b0a4726 100644 --- a/src/libasr/codegen/asr_to_x86.h +++ b/src/libasr/codegen/asr_to_x86.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_ASR_TO_X86_H -#define LFORTRAN_ASR_TO_X86_H +#ifndef LIBASR_ASR_TO_X86_H +#define LIBASR_ASR_TO_X86_H #include @@ -12,4 +12,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_ASR_TO_X86_H +#endif // LIBASR_ASR_TO_X86_H diff --git a/src/libasr/codegen/c_utils.h b/src/libasr/codegen/c_utils.h index 7d11fe60fe7..860a79aef6a 100644 --- a/src/libasr/codegen/c_utils.h +++ b/src/libasr/codegen/c_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_C_UTILS_H -#define LFORTRAN_C_UTILS_H +#ifndef LIBASR_C_UTILS_H +#define LIBASR_C_UTILS_H #include #include @@ -945,4 +945,4 @@ class CCPPDSUtils { } // namespace LCompilers -#endif // LFORTRAN_C_UTILS_H +#endif // LIBASR_C_UTILS_H diff --git a/src/libasr/codegen/evaluator.h b/src/libasr/codegen/evaluator.h index 9c8e1a21c7e..c0934324fc4 100644 --- a/src/libasr/codegen/evaluator.h +++ b/src/libasr/codegen/evaluator.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_EVALUATOR_H -#define LFORTRAN_EVALUATOR_H +#ifndef LIBASR_EVALUATOR_H +#define LIBASR_EVALUATOR_H #include #include @@ -75,4 +75,4 @@ class LLVMEvaluator } // namespace LCompilers -#endif // LFORTRAN_EVALUATOR_H +#endif // LIBASR_EVALUATOR_H diff --git a/src/libasr/codegen/llvm_array_utils.h b/src/libasr/codegen/llvm_array_utils.h index 9f702e656d1..fb644e4a31e 100644 --- a/src/libasr/codegen/llvm_array_utils.h +++ b/src/libasr/codegen/llvm_array_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_LLVM_ARR_UTILS_H -#define LFORTRAN_LLVM_ARR_UTILS_H +#ifndef LIBASR_LLVM_ARR_UTILS_H +#define LIBASR_LLVM_ARR_UTILS_H #include #include @@ -406,4 +406,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_LLVM_ARR_UTILS_H +#endif // LIBASR_LLVM_ARR_UTILS_H diff --git a/src/libasr/codegen/llvm_utils.h b/src/libasr/codegen/llvm_utils.h index f40b6e8613d..b747f5fa8cc 100644 --- a/src/libasr/codegen/llvm_utils.h +++ b/src/libasr/codegen/llvm_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_LLVM_UTILS_H -#define LFORTRAN_LLVM_UTILS_H +#ifndef LIBASR_LLVM_UTILS_H +#define LIBASR_LLVM_UTILS_H #include @@ -570,4 +570,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_LLVM_UTILS_H +#endif // LIBASR_LLVM_UTILS_H diff --git a/src/libasr/codegen/wasm_decoder.h b/src/libasr/codegen/wasm_decoder.h index ef79d500a87..cc12c8ab081 100644 --- a/src/libasr/codegen/wasm_decoder.h +++ b/src/libasr/codegen/wasm_decoder.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_WASM_DECODER_H -#define LFORTRAN_WASM_DECODER_H +#ifndef LIBASR_WASM_DECODER_H +#define LIBASR_WASM_DECODER_H #include @@ -331,4 +331,4 @@ class WASMDecoder { } // namespace LCompilers -#endif // LFORTRAN_WASM_DECODER_H +#endif // LIBASR_WASM_DECODER_H diff --git a/src/libasr/codegen/wasm_to_wat.h b/src/libasr/codegen/wasm_to_wat.h index 0f2f8546437..bea88228279 100644 --- a/src/libasr/codegen/wasm_to_wat.h +++ b/src/libasr/codegen/wasm_to_wat.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_WASM_TO_WAT_H -#define LFORTRAN_WASM_TO_WAT_H +#ifndef LIBASR_WASM_TO_WAT_H +#define LIBASR_WASM_TO_WAT_H #include @@ -288,4 +288,4 @@ Result wasm_to_wat(Vec &wasm_bytes, Allocator &al, } // namespace LCompilers -#endif // LFORTRAN_WASM_TO_WAT_H +#endif // LIBASR_WASM_TO_WAT_H diff --git a/src/libasr/codegen/wasm_to_x86.h b/src/libasr/codegen/wasm_to_x86.h index 11c456ab272..576f16fb2c5 100644 --- a/src/libasr/codegen/wasm_to_x86.h +++ b/src/libasr/codegen/wasm_to_x86.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_WASM_TO_X86_H -#define LFORTRAN_WASM_TO_X86_H +#ifndef LIBASR_WASM_TO_X86_H +#define LIBASR_WASM_TO_X86_H #include @@ -11,4 +11,4 @@ Result wasm_to_x86(Vec &wasm_bytes, Allocator &al, } // namespace LCompilers -#endif // LFORTRAN_WASM_TO_X86_H +#endif // LIBASR_WASM_TO_X86_H diff --git a/src/libasr/codegen/wasm_utils.h b/src/libasr/codegen/wasm_utils.h index 8b65afe45aa..3f7eef38cad 100644 --- a/src/libasr/codegen/wasm_utils.h +++ b/src/libasr/codegen/wasm_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_WASM_UTILS_H -#define LFORTRAN_WASM_UTILS_H +#ifndef LIBASR_WASM_UTILS_H +#define LIBASR_WASM_UTILS_H #include #include @@ -70,4 +70,4 @@ void hexdump(void *ptr, int buflen); } // namespace LCompilers -#endif // LFORTRAN_WASM_UTILS_H +#endif // LIBASR_WASM_UTILS_H diff --git a/src/libasr/codegen/x86_assembler.cpp b/src/libasr/codegen/x86_assembler.cpp index 7cc658e50eb..b68e4c272ed 100644 --- a/src/libasr/codegen/x86_assembler.cpp +++ b/src/libasr/codegen/x86_assembler.cpp @@ -1,8 +1,8 @@ #ifdef __unix__ -#define LFORTRAN_LINUX +#define LIBASR_LINUX #endif -#ifdef LFORTRAN_LINUX +#ifdef LIBASR_LINUX #include #endif @@ -16,7 +16,7 @@ void X86Assembler::save_binary(const std::string &filename) { out.open(filename); out.write((const char*) m_code.p, m_code.size()); } -#ifdef LFORTRAN_LINUX +#ifdef LIBASR_LINUX std::string mode = "0755"; int mod = strtol(mode.c_str(), 0, 8); if (chmod(filename.c_str(),mod) < 0) { diff --git a/src/libasr/codegen/x86_assembler.h b/src/libasr/codegen/x86_assembler.h index 31e360926f8..d981d7b642e 100644 --- a/src/libasr/codegen/x86_assembler.h +++ b/src/libasr/codegen/x86_assembler.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_CODEGEN_X86_ASSEMBER_H -#define LFORTRAN_CODEGEN_X86_ASSEMBER_H +#ifndef LIBASR_CODEGEN_X86_ASSEMBER_H +#define LIBASR_CODEGEN_X86_ASSEMBER_H /* @@ -13,7 +13,7 @@ final machine code is not the shortest possible, because jumps could possibly be encoded shorter if the final relative address is shorter, but it would require more passes and thus slower compilation. -For debugging purposes, one can enable the macro LFORTRAN_ASM_PRINT and one can +For debugging purposes, one can enable the macro LCOMPILERS_ASM_PRINT and one can then obtain a human readable assembly printout of all instructions. Disable the macro for best performance. @@ -33,9 +33,9 @@ macro for best performance. #include // Define to allow the Assembler print the asm instructions -#define LFORTRAN_ASM_PRINT +#define LCOMPILERS_ASM_PRINT -#ifdef LFORTRAN_ASM_PRINT +#ifdef LCOMPILERS_ASM_PRINT # define EMIT(s) emit(" ", s) # define EMIT_LABEL(s) emit("", s) # define EMIT_VAR(a, b) emit("\n", a + " equ " + i2s(b) + "\n") @@ -263,7 +263,7 @@ class X86Assembler { Vec m_code; std::map m_symbols; uint32_t m_origin; -#ifdef LFORTRAN_ASM_PRINT +#ifdef LCOMPILERS_ASM_PRINT std::string m_asm_code; void emit(const std::string &indent, const std::string &s) { m_asm_code += indent + s + "\n"; @@ -273,12 +273,12 @@ class X86Assembler { X86Assembler(Allocator &al) : m_al{al} { m_code.reserve(m_al, 1024*128); m_origin = 0x08048000; -#ifdef LFORTRAN_ASM_PRINT +#ifdef LCOMPILERS_ASM_PRINT m_asm_code = "BITS 32\n\n"; #endif } -#ifdef LFORTRAN_ASM_PRINT +#ifdef LCOMPILERS_ASM_PRINT std::string get_asm() { return m_asm_code; } @@ -831,4 +831,4 @@ void emit_print_int(X86Assembler &a, const std::string &name); } // namespace LCompilers -#endif // LFORTRAN_CODEGEN_X86_ASSEMBER_H +#endif // LIBASR_CODEGEN_X86_ASSEMBER_H diff --git a/src/libasr/colors.h b/src/libasr/colors.h index b5bf2600868..119052012e4 100644 --- a/src/libasr/colors.h +++ b/src/libasr/colors.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_COLORS_H -#define LFORTRAN_COLORS_H +#ifndef LIBASR_COLORS_H +#define LIBASR_COLORS_H namespace LCompilers { @@ -72,4 +72,4 @@ std::string color(T const value) } // namespace LCompilers -#endif // LFORTRAN_COLORS_H +#endif // LIBASR_COLORS_H diff --git a/src/libasr/containers.h b/src/libasr/containers.h index 9bbed180c5c..206f8c11377 100644 --- a/src/libasr/containers.h +++ b/src/libasr/containers.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_CONTAINERS_H -#define LFORTRAN_CONTAINERS_H +#ifndef LIBASR_CONTAINERS_H +#define LIBASR_CONTAINERS_H #include #include diff --git a/src/libasr/diagnostics.h b/src/libasr/diagnostics.h index 615fea34902..96851ba33d3 100644 --- a/src/libasr/diagnostics.h +++ b/src/libasr/diagnostics.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_DIAGNOSTICS_H -#define LFORTRAN_DIAGNOSTICS_H +#ifndef LIBASR_DIAGNOSTICS_H +#define LIBASR_DIAGNOSTICS_H #include #include @@ -217,7 +217,7 @@ std::string render_diagnostic_short(const Diagnostic &d); std::string render_diagnostic_human(Diagnostic &d, const std::string &input, const LocationManager &lm, bool use_colors, bool show_stacktrace); std::string render_diagnostic_short(Diagnostic &d, const std::string &input, - const LocationManager &lm); + const LocationManager &lm); /** * @brief Convert diagnostic `Level` i.e. severity to string and color accordingly. * @@ -259,4 +259,4 @@ std::tuple diag_level_to_str(const Diagno } // namespace LCompilers -#endif // LFORTRAN_DIAGNOSTICS_H +#endif // LIBASR_DIAGNOSTICS_H diff --git a/src/libasr/exception.h b/src/libasr/exception.h index 8c5cf9b4734..30b89ea90df 100644 --- a/src/libasr/exception.h +++ b/src/libasr/exception.h @@ -1,18 +1,18 @@ -#ifndef LFORTRAN_EXCEPTION_H -#define LFORTRAN_EXCEPTION_H +#ifndef LIBASR_EXCEPTION_H +#define LIBASR_EXCEPTION_H #ifdef __cplusplus extern "C" { #endif typedef enum { - LFORTRAN_NO_EXCEPTION = 0, - LFORTRAN_RUNTIME_ERROR = 1, - LFORTRAN_EXCEPTION = 2, - LFORTRAN_PARSER_ERROR = 4, + LCOMPILERS_NO_EXCEPTION = 0, + LCOMPILERS_RUNTIME_ERROR = 1, + LCOMPILERS_EXCEPTION = 2, + LCOMPILERS_PARSER_ERROR = 4, LCOMPILERS_ASSERT_FAILED = 7, - LFORTRAN_ASSEMBLER_ERROR = 8, -} lfortran_exceptions_t; + LCOMPILERS_ASSEMBLER_ERROR = 8, +} lcompilers_exceptions_t; #ifdef __cplusplus } @@ -100,14 +100,14 @@ const int stacktrace_depth = 4; class LCompilersException : public std::exception { std::string m_msg; - lfortran_exceptions_t ec; + lcompilers_exceptions_t ec; std::vector m_stacktrace_addresses; public: - LCompilersException(const std::string &msg, lfortran_exceptions_t error) + LCompilersException(const std::string &msg, lcompilers_exceptions_t error) : m_msg{msg}, ec{error}, m_stacktrace_addresses{get_stacktrace_addresses()} { } LCompilersException(const std::string &msg) - : LCompilersException(msg, LFORTRAN_EXCEPTION) + : LCompilersException(msg, LCOMPILERS_EXCEPTION) { } const char *what() const throw() @@ -121,9 +121,9 @@ class LCompilersException : public std::exception std::string name() const { switch (ec) { - case (lfortran_exceptions_t::LFORTRAN_EXCEPTION) : + case (lcompilers_exceptions_t::LCOMPILERS_EXCEPTION) : return "LCompilersException"; - case (lfortran_exceptions_t::LCOMPILERS_ASSERT_FAILED) : + case (lcompilers_exceptions_t::LCOMPILERS_ASSERT_FAILED) : return "AssertFailed"; default : return "Unknown Exception"; } @@ -132,7 +132,7 @@ class LCompilersException : public std::exception { return m_stacktrace_addresses; } - lfortran_exceptions_t error_code() + lcompilers_exceptions_t error_code() { return ec; } @@ -151,7 +151,7 @@ class AssemblerError : public LCompilersException { public: AssemblerError(const std::string &msg) - : LCompilersException(msg, LFORTRAN_ASSEMBLER_ERROR) + : LCompilersException(msg, LCOMPILERS_ASSEMBLER_ERROR) { } }; @@ -169,4 +169,4 @@ static inline T TRY(Result result) { } // namespace LCompilers #endif // __cplusplus -#endif // LFORTRAN_EXCEPTION_H +#endif // LIBASR_EXCEPTION_H diff --git a/src/libasr/location.h b/src/libasr/location.h index 16ae72ab1f9..97be727a2ce 100644 --- a/src/libasr/location.h +++ b/src/libasr/location.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PARSER_LOCATION_H -#define LFORTRAN_PARSER_LOCATION_H +#ifndef LIBASR_PARSER_LOCATION_H +#define LIBASR_PARSER_LOCATION_H #include #include diff --git a/src/libasr/modfile.h b/src/libasr/modfile.h index b331af42c97..7e083e319da 100644 --- a/src/libasr/modfile.h +++ b/src/libasr/modfile.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_MODFILE_H -#define LFORTRAN_MODFILE_H +#ifndef LIBASR_MODFILE_H +#define LIBASR_MODFILE_H #include @@ -19,4 +19,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_MODFILE_H +#endif // LIBASR_MODFILE_H diff --git a/src/libasr/pass/arr_slice.h b/src/libasr/pass/arr_slice.h index a2ab04bd186..b6e59c1d9e2 100644 --- a/src/libasr/pass/arr_slice.h +++ b/src/libasr/pass/arr_slice.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_ARR_SLICE_H -#define LFORTRAN_PASS_ARR_SLICE_H +#ifndef LIBASR_PASS_ARR_SLICE_H +#define LIBASR_PASS_ARR_SLICE_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_ARR_SLICE_H +#endif // LIBASR_PASS_ARR_SLICE_H diff --git a/src/libasr/pass/array_op.h b/src/libasr/pass/array_op.h index 33d13bf1aa6..676d1b68f5f 100644 --- a/src/libasr/pass/array_op.h +++ b/src/libasr/pass/array_op.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_ARRAY_OP_H -#define LFORTRAN_PASS_ARRAY_OP_H +#ifndef LIBASR_PASS_ARRAY_OP_H +#define LIBASR_PASS_ARRAY_OP_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_ARRAY_OP_H +#endif // LIBASR_PASS_ARRAY_OP_H diff --git a/src/libasr/pass/class_constructor.h b/src/libasr/pass/class_constructor.h index d46b286d0d5..3d4183f0f35 100644 --- a/src/libasr/pass/class_constructor.h +++ b/src/libasr/pass/class_constructor.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_CLASS_CONSTRUCTOR_H -#define LFORTRAN_PASS_CLASS_CONSTRUCTOR_H +#ifndef LIBASR_PASS_CLASS_CONSTRUCTOR_H +#define LIBASR_PASS_CLASS_CONSTRUCTOR_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_CLASS_CONSTRUCTOR_H +#endif // LIBASR_PASS_CLASS_CONSTRUCTOR_H diff --git a/src/libasr/pass/do_loops.h b/src/libasr/pass/do_loops.h index 7806cb91224..97114b734c5 100644 --- a/src/libasr/pass/do_loops.h +++ b/src/libasr/pass/do_loops.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_DO_LOOPS_H -#define LFORTRAN_PASS_DO_LOOPS_H +#ifndef LIBASR_PASS_DO_LOOPS_H +#define LIBASR_PASS_DO_LOOPS_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_DO_LOOPS_H +#endif // LIBASR_PASS_DO_LOOPS_H diff --git a/src/libasr/pass/for_all.h b/src/libasr/pass/for_all.h index 47fa99587fd..7530d1fcaaa 100644 --- a/src/libasr/pass/for_all.h +++ b/src/libasr/pass/for_all.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_FOR_ALL -#define LFORTRAN_PASS_FOR_ALL +#ifndef LIBASR_PASS_FOR_ALL +#define LIBASR_PASS_FOR_ALL #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_FOR_ALL +#endif // LIBASR_PASS_FOR_ALL diff --git a/src/libasr/pass/global_stmts.h b/src/libasr/pass/global_stmts.h index ac3bfbbeaa8..7cc3acf065f 100644 --- a/src/libasr/pass/global_stmts.h +++ b/src/libasr/pass/global_stmts.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_GLOBAL_STMTS_H -#define LFORTRAN_PASS_GLOBAL_STMTS_H +#ifndef LIBASR_PASS_GLOBAL_STMTS_H +#define LIBASR_PASS_GLOBAL_STMTS_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_GLOBAL_STMTS_H +#endif // LIBASR_PASS_GLOBAL_STMTS_H diff --git a/src/libasr/pass/implied_do_loops.h b/src/libasr/pass/implied_do_loops.h index 0c611a363bf..af3fe2cd496 100644 --- a/src/libasr/pass/implied_do_loops.h +++ b/src/libasr/pass/implied_do_loops.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_IMPLIED_DO_LOOPS_H -#define LFORTRAN_PASS_IMPLIED_DO_LOOPS_H +#ifndef LIBASR_PASS_IMPLIED_DO_LOOPS_H +#define LIBASR_PASS_IMPLIED_DO_LOOPS_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_IMPLIED_DO_LOOPS_H +#endif // LIBASR_PASS_IMPLIED_DO_LOOPS_H diff --git a/src/libasr/pass/instantiate_template.h b/src/libasr/pass/instantiate_template.h index 5b941c52fae..8a8319310e7 100644 --- a/src/libasr/pass/instantiate_template.h +++ b/src/libasr/pass/instantiate_template.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_TEMPLATE_VISITOR_H -#define LFORTRAN_PASS_TEMPLATE_VISITOR_H +#ifndef LIBASR_PASS_TEMPLATE_VISITOR_H +#define LIBASR_PASS_TEMPLATE_VISITOR_H #include @@ -15,4 +15,4 @@ namespace LCompilers { SymbolTable *current_scope, std::string new_func_name, ASR::Function_t *func); } // namespace LCompilers -#endif // LFORTRAN_PASS_TEMPLATE_VISITOR_H +#endif // LIBASR_PASS_TEMPLATE_VISITOR_H diff --git a/src/libasr/pass/nested_vars.h b/src/libasr/pass/nested_vars.h index e669e6fd7d7..f38b4693b49 100644 --- a/src/libasr/pass/nested_vars.h +++ b/src/libasr/pass/nested_vars.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_NESTED_VARS_H -#define LFORTRAN_PASS_NESTED_VARS_H +#ifndef LIBASR_PASS_NESTED_VARS_H +#define LIBASR_PASS_NESTED_VARS_H #include #include @@ -14,4 +14,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_NESTED_VARS_H +#endif // LIBASR_PASS_NESTED_VARS_H diff --git a/src/libasr/pass/param_to_const.h b/src/libasr/pass/param_to_const.h index 8b2c70ac567..a04df5eebbf 100644 --- a/src/libasr/pass/param_to_const.h +++ b/src/libasr/pass/param_to_const.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_PARAM_TO_CONST_H -#define LFORTRAN_PASS_PARAM_TO_CONST_H +#ifndef LIBASR_PASS_PARAM_TO_CONST_H +#define LIBASR_PASS_PARAM_TO_CONST_H #include #include @@ -12,4 +12,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_PARAM_TO_CONST_H +#endif // LIBASR_PASS_PARAM_TO_CONST_H diff --git a/src/libasr/pass/pass_array_by_data.h b/src/libasr/pass/pass_array_by_data.h index 6b7fc49b16a..88efb0e7a5f 100644 --- a/src/libasr/pass/pass_array_by_data.h +++ b/src/libasr/pass/pass_array_by_data.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_ARRAY_BY_DATA_H -#define LFORTRAN_PASS_ARRAY_BY_DATA_H +#ifndef LIBASR_PASS_ARRAY_BY_DATA_H +#define LIBASR_PASS_ARRAY_BY_DATA_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_ARRAY_BY_DATA_H +#endif // LIBASR_PASS_ARRAY_BY_DATA_H diff --git a/src/libasr/pass/pass_utils.h b/src/libasr/pass/pass_utils.h index 7f4d07f0ecf..7e30ed14af9 100644 --- a/src/libasr/pass/pass_utils.h +++ b/src/libasr/pass/pass_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_UTILS_H -#define LFORTRAN_PASS_UTILS_H +#ifndef LIBASR_PASS_UTILS_H +#define LIBASR_PASS_UTILS_H #include #include @@ -285,4 +285,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_UTILS_H +#endif // LIBASR_PASS_UTILS_H diff --git a/src/libasr/pass/print_arr.h b/src/libasr/pass/print_arr.h index e3914ac31c2..593757ea066 100644 --- a/src/libasr/pass/print_arr.h +++ b/src/libasr/pass/print_arr.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_PRINT_ARR_H -#define LFORTRAN_PASS_PRINT_ARR_H +#ifndef LIBASR_PASS_PRINT_ARR_H +#define LIBASR_PASS_PRINT_ARR_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_PRINT_ARR_H +#endif // LIBASR_PASS_PRINT_ARR_H diff --git a/src/libasr/pass/print_list.h b/src/libasr/pass/print_list.h index f7180584ead..dedf026b7f7 100644 --- a/src/libasr/pass/print_list.h +++ b/src/libasr/pass/print_list.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_PRINT_LIST_H -#define LFORTRAN_PASS_PRINT_LIST_H +#ifndef LIBASR_PASS_PRINT_LIST_H +#define LIBASR_PASS_PRINT_LIST_H #include #include @@ -12,4 +12,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_PRINT_LIST_H +#endif // LIBASR_PASS_PRINT_LIST_H diff --git a/src/libasr/pass/select_case.h b/src/libasr/pass/select_case.h index c560af5ff95..81ce330bf4c 100644 --- a/src/libasr/pass/select_case.h +++ b/src/libasr/pass/select_case.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_SELECT_CASE_H -#define LFORTRAN_PASS_SELECT_CASE_H +#ifndef LIBASR_PASS_SELECT_CASE_H +#define LIBASR_PASS_SELECT_CASE_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_SELECT_CASE_H +#endif // LIBASR_PASS_SELECT_CASE_H diff --git a/src/libasr/pass/unused_functions.h b/src/libasr/pass/unused_functions.h index 788932539b7..e0a078ef6ba 100644 --- a/src/libasr/pass/unused_functions.h +++ b/src/libasr/pass/unused_functions.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_UNUSED_FUNCTIONS_H -#define LFORTRAN_PASS_UNUSED_FUNCTIONS_H +#ifndef LIBASR_PASS_UNUSED_FUNCTIONS_H +#define LIBASR_PASS_UNUSED_FUNCTIONS_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_UNUSED_FUNCTIONS_H +#endif // LIBASR_PASS_UNUSED_FUNCTIONS_H diff --git a/src/libasr/pass/update_array_dim_intrinsic_calls.h b/src/libasr/pass/update_array_dim_intrinsic_calls.h index 0e6df1ad80a..87a70bfb3a6 100644 --- a/src/libasr/pass/update_array_dim_intrinsic_calls.h +++ b/src/libasr/pass/update_array_dim_intrinsic_calls.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PASS_UPDATE_ARRAY_DIM_H -#define LFORTRAN_PASS_UPDATE_ARRAY_DIM_H +#ifndef LIBASR_PASS_UPDATE_ARRAY_DIM_H +#define LIBASR_PASS_UPDATE_ARRAY_DIM_H #include #include @@ -11,4 +11,4 @@ namespace LCompilers { } // namespace LCompilers -#endif // LFORTRAN_PASS_UPDATE_ARRAY_DIM_H +#endif // LIBASR_PASS_UPDATE_ARRAY_DIM_H diff --git a/src/libasr/runtime/lfortran_intrinsics.h b/src/libasr/runtime/lfortran_intrinsics.h index 05e4c1549fb..9d65bac385e 100644 --- a/src/libasr/runtime/lfortran_intrinsics.h +++ b/src/libasr/runtime/lfortran_intrinsics.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_INTRINSICS_H -#define LFORTRAN_INTRINSICS_H +#ifndef LIBASR_INTRINSICS_H +#define LIBASR_INTRINSICS_H #include #include diff --git a/src/libasr/semantic_exception.h b/src/libasr/semantic_exception.h index 9a4d4fd2995..6c1bc1777ea 100644 --- a/src/libasr/semantic_exception.h +++ b/src/libasr/semantic_exception.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_SEMANTICS_SEMANTIC_EXCEPTION_H -#define LFORTRAN_SEMANTICS_SEMANTIC_EXCEPTION_H +#ifndef LIBASR_SEMANTICS_SEMANTIC_EXCEPTION_H +#define LIBASR_SEMANTICS_SEMANTIC_EXCEPTION_H #include diff --git a/src/libasr/stacktrace.h b/src/libasr/stacktrace.h index b90edfe70fd..8d1c66e8a1f 100644 --- a/src/libasr/stacktrace.h +++ b/src/libasr/stacktrace.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_STACKTRACE_H -#define LFORTRAN_STACKTRACE_H +#ifndef LIBASR_STACKTRACE_H +#define LIBASR_STACKTRACE_H #include #include @@ -65,4 +65,4 @@ std::string error_stacktrace(const std::vector &stacktrace); } // namespace LCompilers -#endif // LFORTRAN_STACKTRACE_H +#endif // LIBASR_STACKTRACE_H diff --git a/src/libasr/string_utils.h b/src/libasr/string_utils.h index 44eac01151a..6b3662ac992 100644 --- a/src/libasr/string_utils.h +++ b/src/libasr/string_utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_STRING_UTILS_H -#define LFORTRAN_STRING_UTILS_H +#ifndef LIBASR_STRING_UTILS_H +#define LIBASR_STRING_UTILS_H #include #include @@ -35,4 +35,4 @@ std::string join_paths(const std::vector &paths); } // namespace LCompilers -#endif // LFORTRAN_STRING_UTILS_H +#endif // LIBASR_STRING_UTILS_H diff --git a/src/libasr/utils2.cpp b/src/libasr/utils2.cpp index 5e325be48aa..fb6221b6bb2 100644 --- a/src/libasr/utils2.cpp +++ b/src/libasr/utils2.cpp @@ -113,7 +113,7 @@ void get_executable_path(std::string &executable_path, int &dirname_length) } std::string get_runtime_library_dir() { - char *env_p = std::getenv("LFORTRAN_RUNTIME_LIBRARY_DIR"); + char *env_p = std::getenv("LCOMPILERS_RUNTIME_LIBRARY_DIR"); if (env_p) return env_p; std::string path; @@ -137,7 +137,7 @@ std::string get_runtime_library_dir() { std::string get_runtime_library_header_dir() { - char *env_p = std::getenv("LFORTRAN_RUNTIME_LIBRARY_HEADER_DIR"); + char *env_p = std::getenv("LCOMPILERS_RUNTIME_LIBRARY_HEADER_DIR"); if (env_p) return env_p; return get_runtime_library_dir() + "/impure"; diff --git a/src/libasr/wasm_instructions_visitor.py b/src/libasr/wasm_instructions_visitor.py index 8d94d42f32d..bc1355caa6b 100644 --- a/src/libasr/wasm_instructions_visitor.py +++ b/src/libasr/wasm_instructions_visitor.py @@ -2,8 +2,8 @@ import os import re -HEAD = r"""#ifndef LFORTRAN_%(MOD)s_H -#define LFORTRAN_%(MOD)s_H +HEAD = r"""#ifndef LIBASR_%(MOD)s_H +#define LIBASR_%(MOD)s_H // Generated by grammar/wasm_instructions_visitor.py @@ -27,7 +27,7 @@ } // namespace LCompilers -#endif // LFORTRAN_%(MOD)s_H +#endif // LIBASR_%(MOD)s_H """ class WASMInstructionsVisitor(): diff --git a/src/lpython/bigint.h b/src/lpython/bigint.h index 6fd5622a7be..c906cf618f0 100644 --- a/src/lpython/bigint.h +++ b/src/lpython/bigint.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_BIGINT_H -#define LFORTRAN_BIGINT_H +#ifndef LPYTHON_BIGINT_H +#define LPYTHON_BIGINT_H #include @@ -165,4 +165,4 @@ static_assert(sizeof(BigInt) == 8); } // LCompilers::LPython -#endif // LFORTRAN_BIGINT_H +#endif // LPYTHON_BIGINT_H diff --git a/src/lpython/pickle.h b/src/lpython/pickle.h index 48235285ca1..3bae318452c 100644 --- a/src/lpython/pickle.h +++ b/src/lpython/pickle.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PICKLE_H -#define LFORTRAN_PICKLE_H +#ifndef LPYTHON_PICKLE_H +#define LPYTHON_PICKLE_H #include @@ -17,4 +17,4 @@ namespace LCompilers::LPython { } -#endif // LFORTRAN_PICKLE_H +#endif // LPYTHON_PICKLE_H diff --git a/src/lpython/python_evaluator.h b/src/lpython/python_evaluator.h index 2f73e72a39d..1fe48727096 100644 --- a/src/lpython/python_evaluator.h +++ b/src/lpython/python_evaluator.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PYTHON_EVALUATOR_H -#define LFORTRAN_PYTHON_EVALUATOR_H +#ifndef LPYTHON_PYTHON_EVALUATOR_H +#define LPYTHON_PYTHON_EVALUATOR_H #include #include @@ -68,4 +68,4 @@ class PythonCompiler } // namespace LCompilers -#endif // LFORTRAN_PYTHON_EVALUATOR_H +#endif // LPYTHON_PYTHON_EVALUATOR_H diff --git a/src/lpython/python_serialization.h b/src/lpython/python_serialization.h index b4c68ec0251..5183e94dc23 100644 --- a/src/lpython/python_serialization.h +++ b/src/lpython/python_serialization.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PYTHON_SERIALIZATION_H -#define LFORTRAN_PYTHON_SERIALIZATION_H +#ifndef LPYTHON_PYTHON_SERIALIZATION_H +#define LPYTHON_PYTHON_SERIALIZATION_H #include #include @@ -10,4 +10,4 @@ namespace LCompilers::LPython { } // namespace LCompilers::LPython -#endif // LFORTRAN_PYTHON_SERIALIZATION_H +#endif // LPYTHON_PYTHON_SERIALIZATION_H diff --git a/src/lpython/semantics/python_ast_to_asr.h b/src/lpython/semantics/python_ast_to_asr.h index f2000aed49c..a33f45f07c2 100644 --- a/src/lpython/semantics/python_ast_to_asr.h +++ b/src/lpython/semantics/python_ast_to_asr.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_PYTHON_AST_TO_ASR_H -#define LFORTRAN_PYTHON_AST_TO_ASR_H +#ifndef LPYTHON_PYTHON_AST_TO_ASR_H +#define LPYTHON_PYTHON_AST_TO_ASR_H #include #include @@ -17,4 +17,4 @@ namespace LCompilers::LPython { } // namespace LCompilers::LPython -#endif // LFORTRAN_PYTHON_AST_TO_ASR_H +#endif // LPYTHON_PYTHON_AST_TO_ASR_H diff --git a/src/lpython/semantics/semantic_exception.h b/src/lpython/semantics/semantic_exception.h index 8ee4c307f35..86a9f350df8 100644 --- a/src/lpython/semantics/semantic_exception.h +++ b/src/lpython/semantics/semantic_exception.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_SEMANTICS_SEMANTIC_EXCEPTION_H -#define LFORTRAN_SEMANTICS_SEMANTIC_EXCEPTION_H +#ifndef LPYTHON_SEMANTICS_SEMANTIC_EXCEPTION_H +#define LPYTHON_SEMANTICS_SEMANTIC_EXCEPTION_H #include diff --git a/src/lpython/utils.h b/src/lpython/utils.h index c19cba084cd..c8116f456c3 100644 --- a/src/lpython/utils.h +++ b/src/lpython/utils.h @@ -1,5 +1,5 @@ -#ifndef LFORTRAN_UTILS_H -#define LFORTRAN_UTILS_H +#ifndef LPYTHON_UTILS_H +#define LPYTHON_UTILS_H #include #include @@ -11,4 +11,4 @@ bool path_exists(std::string path); } // LCompilers::LPython -#endif // LFORTRAN_UTILS_H +#endif // LPYTHON_UTILS_H