aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/result.h3
-rw-r--r--include/elna/gcc/elna-tree.h8
-rw-r--r--include/elna/gcc/elna1.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/include/elna/boot/result.h b/include/elna/boot/result.h
index c73799d..36be8ee 100644
--- a/include/elna/boot/result.h
+++ b/include/elna/boot/result.h
@@ -655,6 +655,9 @@ namespace elna::boot
private:
static constexpr std::size_t golden_ratio = 0x9e3779b9;
+ static constexpr int mix_shift_left = 6;
+ static constexpr int mix_shift_right = 2;
+
std::size_t m_seed{ 0 };
};
}
diff --git a/include/elna/gcc/elna-tree.h b/include/elna/gcc/elna-tree.h
index 219acb1..8f7e306 100644
--- a/include/elna/gcc/elna-tree.h
+++ b/include/elna/gcc/elna-tree.h
@@ -30,6 +30,8 @@ along with GCC; see the file COPYING3. If not see
#include "elna/boot/symbol.h"
#include "elna/gcc/elna1.h"
+#include <array>
+
namespace elna::gcc
{
using symbol_table = boot::symbol_map<tree, tree, NULL_TREE>;
@@ -67,14 +69,14 @@ namespace elna::gcc
template<typename... Args>
tree call_built_in(location_t call_location, const char *name, tree return_type, Args... arguments)
{
- tree *builtin = elna_global_decls->get(name);
+ const tree *builtin = elna_global_decls->get(name);
gcc_assert(builtin != nullptr);
tree fndecl_type = build_function_type(return_type, TYPE_ARG_TYPES(*builtin));
tree builtin_addr = build1_loc(call_location, ADDR_EXPR, build_pointer_type(fndecl_type), *builtin);
- tree argument_trees[sizeof...(Args)] = {arguments...};
+ std::array<tree, sizeof...(Args)> argument_trees = { arguments... };
- return fold_build_call_array(return_type, builtin_addr, sizeof...(Args), argument_trees);
+ return fold_build_call_array(return_type, builtin_addr, sizeof...(Args), argument_trees.data());
}
}
diff --git a/include/elna/gcc/elna1.h b/include/elna/gcc/elna1.h
index 580526a..96043f9 100644
--- a/include/elna/gcc/elna1.h
+++ b/include/elna/gcc/elna1.h
@@ -31,6 +31,7 @@ enum elna_tree_index
ELNA_TI_MAX
};
+// NOLINTNEXTLINE(modernize-avoid-c-arrays)
extern GTY(()) tree elna_global_trees[ELNA_TI_MAX];
extern GTY(()) hash_map<nofree_string_hash, tree> *elna_global_decls;
extern std::vector<std::string> elna_include_dirs;