summaryrefslogtreecommitdiff
path: root/src/dataflow
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-11-23 07:03:25 +0200
committerGitHub <noreply@github.com>2021-11-22 21:03:25 -0800
commit7f24fce21a92f2aed4a11745d27d5181798ba6cd (patch)
tree80655dc933e3c2ae3ae53b7960cd71a6a022c3da /src/dataflow
parent37999167bb333dd0b12d744af8e633897e65cff8 (diff)
downloadbinaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.gz
binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.tar.bz2
binaryen-7f24fce21a92f2aed4a11745d27d5181798ba6cd.zip
Modernize code to C++17 (#3104)
Diffstat (limited to 'src/dataflow')
-rw-r--r--src/dataflow/graph.h8
-rw-r--r--src/dataflow/node.h8
-rw-r--r--src/dataflow/users.h8
-rw-r--r--src/dataflow/utils.h8
4 files changed, 8 insertions, 24 deletions
diff --git a/src/dataflow/graph.h b/src/dataflow/graph.h
index 6256c4c1e..0380adf14 100644
--- a/src/dataflow/graph.h
+++ b/src/dataflow/graph.h
@@ -31,9 +31,7 @@
#include "ir/literal-utils.h"
#include "wasm.h"
-namespace wasm {
-
-namespace DataFlow {
+namespace wasm::DataFlow {
// Main logic to generate IR for a function. This is implemented as a
// visitor on the wasm, where visitors return a Node* that either
@@ -797,8 +795,6 @@ struct Graph : public UnifiedExpressionVisitor<Graph, Node*> {
const Name FAKE_CALL = "fake$dfo$call";
};
-} // namespace DataFlow
-
-} // namespace wasm
+} // namespace wasm::DataFlow
#endif // wasm_dataflow_graph_h
diff --git a/src/dataflow/node.h b/src/dataflow/node.h
index a59f01357..10e781769 100644
--- a/src/dataflow/node.h
+++ b/src/dataflow/node.h
@@ -28,9 +28,7 @@
#include "ir/utils.h"
#include "wasm.h"
-namespace wasm {
-
-namespace DataFlow {
+namespace wasm::DataFlow {
//
// The core IR representation in DataFlow: a Node.
@@ -218,8 +216,6 @@ struct Node {
}
};
-} // namespace DataFlow
-
-} // namespace wasm
+} // namespace wasm::DataFlow
#endif // wasm_dataflow_node
diff --git a/src/dataflow/users.h b/src/dataflow/users.h
index 369d18bbb..faa41f7f9 100644
--- a/src/dataflow/users.h
+++ b/src/dataflow/users.h
@@ -27,9 +27,7 @@
#include "dataflow/graph.h"
-namespace wasm {
-
-namespace DataFlow {
+namespace wasm::DataFlow {
// Calculates the users of each node.
// users[x] = { y, z, .. }
@@ -95,8 +93,6 @@ public:
void removeAllUsesOf(Node* node) { users.erase(node); }
};
-} // namespace DataFlow
-
-} // namespace wasm
+} // namespace wasm::DataFlow
#endif // wasm_dataflow_users
diff --git a/src/dataflow/utils.h b/src/dataflow/utils.h
index 1cd93764c..af59c4111 100644
--- a/src/dataflow/utils.h
+++ b/src/dataflow/utils.h
@@ -29,9 +29,7 @@
#include "dataflow/node.h"
#include "wasm.h"
-namespace wasm {
-
-namespace DataFlow {
+namespace wasm::DataFlow {
inline std::ostream& dump(Node* node, std::ostream& o, size_t indent = 0) {
auto doIndent = [&]() {
@@ -147,8 +145,6 @@ inline bool allInputsConstant(Node* node) {
return false;
}
-} // namespace DataFlow
-
-} // namespace wasm
+} // namespace wasm::DataFlow
#endif // wasm_dataflow_utils