Skip to content

Commit d8c05a6

Browse files
committed
Fix SwiftRT-Wasm.cpp build issue
1 parent 5667db4 commit d8c05a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/public/runtime/SwiftRT-WASM.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "../SwiftShims/MetadataSections.h"
1515

1616
#include <cstddef>
17+
#include <new>
1718

1819
// Link start/stop symbols weakly to link them if they aren't synthesized by the linker.
1920
#define DECLARE_SWIFT_SECTION(name) \
@@ -47,9 +48,9 @@ static void swift_image_constructor() {
4748
{ reinterpret_cast<uintptr_t>(&__start_##name), \
4849
static_cast<uintptr_t>(&__stop_##name - &__start_##name) }
4950

50-
sections = {
51+
new (&sections) swift::MetadataSections {
5152
swift::CurrentSectionMetadataVersion,
52-
0,
53+
{ 0 },
5354

5455
nullptr,
5556
nullptr,

0 commit comments

Comments
 (0)