summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-10-01 11:34:39 -0700
committerGitHub <noreply@github.com>2024-10-01 11:34:39 -0700
commitcb53f0c6966fe7c8e5cc1a975eab9653b5914bde (patch)
tree5e50d4f57b54accadba1fc2a65bbbb28aeb92c07 /src
parentfcd8dfe7ddd1a4a3ce1be40c674fdd60bbec73d1 (diff)
downloadbinaryen-cb53f0c6966fe7c8e5cc1a975eab9653b5914bde.tar.gz
binaryen-cb53f0c6966fe7c8e5cc1a975eab9653b5914bde.tar.bz2
binaryen-cb53f0c6966fe7c8e5cc1a975eab9653b5914bde.zip
[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.
Diffstat (limited to 'src')
-rw-r--r--src/wasm-type.h2
-rw-r--r--src/wasm/wasm-type.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 5b2074e1c..d26ba324f 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -280,7 +280,7 @@ struct TypeInfo {
Ref ref;
};
- TypeInfo(const Tuple& tuple) : kind(TupleKind), tuple(tuple) {}
+ TypeInfo(const Tuple& tuple);
TypeInfo(Tuple&& tuple) : kind(TupleKind), tuple(std::move(tuple)) {}
TypeInfo(HeapType heapType, Nullability nullable)
: kind(RefKind), ref{heapType, nullable} {}
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index dad8bb669..9bb4f4259 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -479,6 +479,8 @@ std::optional<HeapType> getBasicHeapTypeLUB(HeapType::BasicHeapType a,
} // anonymous namespace
+TypeInfo::TypeInfo(const Tuple& tuple) : kind(TupleKind), tuple(tuple) {}
+
TypeInfo::TypeInfo(const TypeInfo& other) {
kind = other.kind;
switch (kind) {