summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 199257925..4060bac4d 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1872,6 +1872,16 @@ public:
// Module name, if specified. Serves a documentary role only.
Name name;
+ // Optional type name information, used in printing only. Note that Types are
+ // globally interned, but type names are specific to a module.
+ struct TypeNames {
+ // The name of the type.
+ Name name;
+ // For a Struct, names of fields.
+ std::unordered_map<Index, Name> fieldNames;
+ };
+ std::unordered_map<HeapType, TypeNames> typeNames;
+
MixedArena allocator;
private: