From 2e36aee3d5c89699f53b19dd43fbd3e57ccfe45b Mon Sep 17 00:00:00 2001 From: Roberto Rosmaninho Date: Thu, 16 May 2024 11:25:22 -0300 Subject: [PATCH] Using `map` instead of `unordered_map` to ensure reproducibility of kore definition generation (#1059) We have seen that the `definition.kore` has been produced in a different order depending on the OS, which creates a flaky error for some tools like `llvm-komplie-compute-ordinal` and `llvm-kompile-compute-loc`, an error on #1053 MacOS tests, and some frontend errors as well. This PR aims to fix that issue by replacing the data structure used to store the attributes. --- include/kllvm/ast/attribute_set.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kllvm/ast/attribute_set.h b/include/kllvm/ast/attribute_set.h index 82739c722..91515efca 100644 --- a/include/kllvm/ast/attribute_set.h +++ b/include/kllvm/ast/attribute_set.h @@ -1,10 +1,10 @@ #ifndef KLLVM_ATTRIBUTES_H #define KLLVM_ATTRIBUTES_H +#include #include #include #include -#include namespace kllvm { @@ -29,8 +29,8 @@ class kore_composite_pattern; */ class attribute_set { public: - using storage_t = std::unordered_map< - std::string, std::shared_ptr>; + using storage_t + = std::map>; enum class key { Alias,