diff options
Diffstat (limited to 'src/binaryen-shell.cpp')
-rw-r--r-- | src/binaryen-shell.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/binaryen-shell.cpp b/src/binaryen-shell.cpp index 78ff91150..c2b6fcaa7 100644 --- a/src/binaryen-shell.cpp +++ b/src/binaryen-shell.cpp @@ -66,8 +66,8 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { std::vector<char> memory; template <typename T> static bool aligned(const char* address) { - static_assert(!(alignof(T) & (alignof(T) - 1)), "must be a power of 2"); - return 0 == (reinterpret_cast<uintptr_t>(address) & (alignof(T) - 1)); + static_assert(!(sizeof(T) & (sizeof(T) - 1)), "must be a power of 2"); + return 0 == (reinterpret_cast<uintptr_t>(address) & (sizeof(T) - 1)); } Memory(Memory&) = delete; Memory& operator=(const Memory&) = delete; @@ -372,7 +372,7 @@ int main(int argc, const char* argv[]) { } options.parse(argc, argv); - auto input(read_file<std::vector<char>>(options.extra["infile"], options.debug)); + auto input(read_file<std::vector<char>>(options.extra["infile"], Flags::Text, options.debug ? Flags::Debug : Flags::Release)); if (options.debug) std::cerr << "parsing text to s-expressions...\n"; SExpressionParser parser(input.data()); |