summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer
diff options
context:
space:
mode:
authorMartin Kustermann <kustermann.martin@gmail.com>2022-11-17 19:57:57 +0100
committerGitHub <noreply@github.com>2022-11-17 18:57:57 +0000
commitec53f4b2d5b0d52ae703c5b696ecf052ad5fffbb (patch)
tree1c2b0c5aa8b577424fbc7248f38fe676cd731eae /src/emscripten-optimizer
parent590f63782b9ee6307a2bc0e21917001a66ba16ba (diff)
downloadbinaryen-ec53f4b2d5b0d52ae703c5b696ecf052ad5fffbb.tar.gz
binaryen-ec53f4b2d5b0d52ae703c5b696ecf052ad5fffbb.tar.bz2
binaryen-ec53f4b2d5b0d52ae703c5b696ecf052ad5fffbb.zip
Fix warnings from -Wheader-hygiene and -Wimplicit-const-int-float-conversion (#5273)
When `-Wheader-hygiene` is enabled, C compiler will warn when using namespace directive in global context in header file. When `-Wimplicit-const-int-float-conversion` is enabled C compiler will warn on implicit integer to double conversions that change values.
Diffstat (limited to 'src/emscripten-optimizer')
-rw-r--r--src/emscripten-optimizer/optimizer-shared.cpp2
-rw-r--r--src/emscripten-optimizer/optimizer.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/emscripten-optimizer/optimizer-shared.cpp b/src/emscripten-optimizer/optimizer-shared.cpp
index 9ca66441a..8208f6f47 100644
--- a/src/emscripten-optimizer/optimizer-shared.cpp
+++ b/src/emscripten-optimizer/optimizer-shared.cpp
@@ -19,6 +19,8 @@
#include "optimizer.h"
#include "support/safe_integer.h"
+using namespace cashew;
+
IString JS_FLOAT_ZERO;
IString SIMD_INT8X16_CHECK("SIMD_Int8x16_check");
diff --git a/src/emscripten-optimizer/optimizer.h b/src/emscripten-optimizer/optimizer.h
index 9e5c7afe8..a27fe25eb 100644
--- a/src/emscripten-optimizer/optimizer.h
+++ b/src/emscripten-optimizer/optimizer.h
@@ -19,7 +19,6 @@
#include "simple_ast.h"
-using namespace cashew;
using IString = wasm::IString;
extern IString JS_FLOAT_ZERO;
@@ -51,8 +50,8 @@ enum JsSign {
JS_NONSIGNED,
};
-Ref makeJsCoercedZero(JsType type);
-Ref makeJsCoercion(Ref node, JsType type);
-Ref makeSigning(Ref node, JsSign sign);
+cashew::Ref makeJsCoercedZero(JsType type);
+cashew::Ref makeJsCoercion(cashew::Ref node, JsType type);
+cashew::Ref makeSigning(cashew::Ref node, JsSign sign);
#endif // wasm_optimizer_h