diff --git a/CMakeLists.txt b/CMakeLists.txt index 41e1ec45a02..7dd0d914ad6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,9 +250,6 @@ if(MSVC) # workaround for https://github.com/WebAssembly/binaryen/issues/3661 add_compile_flag("/D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING") - # Visual Studio 2018 15.8 implemented conformant support for std::aligned_storage, but the conformant support is only enabled when the following flag is passed, to avoid - # breaking backwards compatibility with code that relied on the non-conformant behavior (the old nonconformant behavior is not used with Binaryen) - add_compile_flag("/D_ENABLE_EXTENDED_ALIGNED_STORAGE") # Don't warn about using "strdup" as a reserved name. add_compile_flag("/D_CRT_NONSTDC_NO_DEPRECATE") diff --git a/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h b/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h index 121aa527a5d..48a291f1945 100644 --- a/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h +++ b/third_party/llvm-project/include/llvm/ADT/FunctionExtras.h @@ -112,8 +112,7 @@ class unique_function { // For in-line storage, we just provide an aligned character buffer. We // provide three pointers worth of storage here. - typename std::aligned_storage::type - InlineStorage; + alignas(void *) mutable std::byte InlineStorage[InlineStorageSize]; } StorageUnion; // A compressed pointer to either our dispatching callback or our table of