summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cfg/Relooper.h6
-rw-r--r--src/support/insert_ordered.h9
2 files changed, 12 insertions, 3 deletions
diff --git a/src/cfg/Relooper.h b/src/cfg/Relooper.h
index 173f180c7..37d262e7d 100644
--- a/src/cfg/Relooper.h
+++ b/src/cfg/Relooper.h
@@ -124,8 +124,8 @@ struct Branch {
Render(RelooperBuilder& Builder, Block* Target, bool SetLabel);
};
-typedef InsertOrderedSet<Block*> BlockSet;
-typedef InsertOrderedMap<Block*, Branch*> BlockBranchMap;
+typedef wasm::InsertOrderedSet<Block*> BlockSet;
+typedef wasm::InsertOrderedMap<Block*, Branch*> BlockBranchMap;
// Represents a basic block of code - some instructions that end with a
// control flow modifier (a branch, return or throw).
@@ -313,7 +313,7 @@ struct Relooper {
void SetMinSize(bool MinSize_) { MinSize = MinSize_; }
};
-typedef InsertOrderedMap<Block*, BlockSet> BlockBlockSetMap;
+typedef wasm::InsertOrderedMap<Block*, BlockSet> BlockBlockSetMap;
#ifdef RELOOPER_DEBUG
struct Debugging {
diff --git a/src/support/insert_ordered.h b/src/support/insert_ordered.h
index 0a5e24ab1..5e3dec96b 100644
--- a/src/support/insert_ordered.h
+++ b/src/support/insert_ordered.h
@@ -14,12 +14,17 @@
* limitations under the License.
*/
+#ifndef wasm_support_insert_ordered_h
+#define wasm_support_insert_ordered_h
+
#include <list>
#include <stddef.h>
#include <unordered_map>
#include "support/utilities.h"
+namespace wasm {
+
// like std::set, except that begin() -> end() iterates in the
// order that elements were added to the set (not in the order
// of operator<(T, T))
@@ -134,3 +139,7 @@ template<typename Key, typename T> struct InsertOrderedMap {
}
bool operator!=(const InsertOrderedMap& other) { return !(*this == other); }
};
+
+} // namespace wasm
+
+#endif // wasm_support_insert_ordered_h