From 2c11ee39de4ff7acc78a7ec9a68037f0e6e2b162 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 27 Jul 2026 17:45:08 +0300 Subject: [PATCH] Linux compilation fixes --- libs/ast/include/pslang/ast/builtins.hpp | 6 +++--- libs/ast/include/pslang/ast/control.hpp | 12 ++++++------ .../include/pslang/interpreter/context.hpp | 2 +- libs/ir/include/pslang/ir/node.hpp | 2 +- libs/jit/include/pslang/jit/abi.hpp | 4 ++++ 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/libs/ast/include/pslang/ast/builtins.hpp b/libs/ast/include/pslang/ast/builtins.hpp index b2c0af5..cd97fe7 100644 --- a/libs/ast/include/pslang/ast/builtins.hpp +++ b/libs/ast/include/pslang/ast/builtins.hpp @@ -12,7 +12,7 @@ namespace pslang::ast { expression_ptr expression; type_ptr type; - location location; + ast::location location; types::type_ptr inferred_source_type = nullptr; types::type_ptr inferred_type = nullptr; }; @@ -21,9 +21,9 @@ namespace pslang::ast { expression_ptr expression; type_ptr type; - location location; + ast::location location; types::type_ptr inferred_source_type = nullptr; types::type_ptr inferred_type = nullptr; }; -} \ No newline at end of file +} diff --git a/libs/ast/include/pslang/ast/control.hpp b/libs/ast/include/pslang/ast/control.hpp index 8583789..34afdd1 100644 --- a/libs/ast/include/pslang/ast/control.hpp +++ b/libs/ast/include/pslang/ast/control.hpp @@ -43,8 +43,8 @@ namespace pslang::ast { expression_ptr condition; statement_list_ptr statements; - location prelude_location; - location location; + ast::location prelude_location; + ast::location location; }; std::vector blocks; @@ -55,18 +55,18 @@ namespace pslang::ast { expression_ptr condition; statement_list_ptr statements; - location prelude_location; - location location; + ast::location prelude_location; + ast::location location; }; struct break_statement { - location location; + ast::location location; }; struct continue_statement { - location location; + ast::location location; }; } diff --git a/libs/interpreter/include/pslang/interpreter/context.hpp b/libs/interpreter/include/pslang/interpreter/context.hpp index 3b38ff8..1f15cb3 100644 --- a/libs/interpreter/include/pslang/interpreter/context.hpp +++ b/libs/interpreter/include/pslang/interpreter/context.hpp @@ -50,7 +50,7 @@ namespace pslang::interpreter struct context { bool trace = false; - foreign_resolver foreign_resolver; + interpreter::foreign_resolver foreign_resolver; std::vector frame_stack; }; diff --git a/libs/ir/include/pslang/ir/node.hpp b/libs/ir/include/pslang/ir/node.hpp index b85933d..95ed72a 100644 --- a/libs/ir/include/pslang/ir/node.hpp +++ b/libs/ir/include/pslang/ir/node.hpp @@ -152,7 +152,7 @@ namespace pslang::ir struct node { - instruction instruction; + ir::instruction instruction; // Null for non-value instructions types::type_ptr inferred_type = nullptr; diff --git a/libs/jit/include/pslang/jit/abi.hpp b/libs/jit/include/pslang/jit/abi.hpp index 3ad653c..ada6f4b 100644 --- a/libs/jit/include/pslang/jit/abi.hpp +++ b/libs/jit/include/pslang/jit/abi.hpp @@ -1,5 +1,9 @@ #pragma once +// 'linux' macro is not standard-conforming, but can still be present +// with -std=gnu++XX or absence of -pedantic. Just undefine it in any case. +#undef linux + namespace pslang::jit {