Skip to content

Commit cb53f0c

Browse files
authored
[NFC] Move a TypeInfo constructor out of a header (#6979)
Some versions of libcxx or clang error without this, apparently due to Type being a forward declaration.
1 parent fcd8dfe commit cb53f0c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/wasm-type.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ struct TypeInfo {
280280
Ref ref;
281281
};
282282

283-
TypeInfo(const Tuple& tuple) : kind(TupleKind), tuple(tuple) {}
283+
TypeInfo(const Tuple& tuple);
284284
TypeInfo(Tuple&& tuple) : kind(TupleKind), tuple(std::move(tuple)) {}
285285
TypeInfo(HeapType heapType, Nullability nullable)
286286
: kind(RefKind), ref{heapType, nullable} {}

src/wasm/wasm-type.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ std::optional<HeapType> getBasicHeapTypeLUB(HeapType::BasicHeapType a,
479479

480480
} // anonymous namespace
481481

482+
TypeInfo::TypeInfo(const Tuple& tuple) : kind(TupleKind), tuple(tuple) {}
483+
482484
TypeInfo::TypeInfo(const TypeInfo& other) {
483485
kind = other.kind;
484486
switch (kind) {

0 commit comments

Comments
 (0)