From da419bdb5e3e167ea90c6923660059f35fa17d67 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Wed, 14 Nov 2018 02:46:21 +0000 Subject: [WebAssembly] Add support for the event section Summary: This adds support for the 'event section' specified in the exception handling proposal. (This was named 'exception section' first, but later renamed to 'event section' to take possibilities of other kinds of events into consideration. But currently we only store exception info in this section.) The event section is added between the global section and the export section. This is for ease of validation per request of the V8 team. This patch: - Creates the event symbol type, which is a weak symbol - Makes 'throw' instruction take the event symbol '__cpp_exception' - Adds relocation support for events - Adds WasmObjectWriter / WasmObjectFile (Reader) support - Adds obj2yaml / yaml2obj support - Adds '.eventtype' printing support Reviewers: dschuff, sbc100, aardappel Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54096 llvm-svn: 346825 --- llvm/lib/BinaryFormat/Wasm.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/BinaryFormat/Wasm.cpp') diff --git a/llvm/lib/BinaryFormat/Wasm.cpp b/llvm/lib/BinaryFormat/Wasm.cpp index ba8de34a6d2..94d40bf02a3 100644 --- a/llvm/lib/BinaryFormat/Wasm.cpp +++ b/llvm/lib/BinaryFormat/Wasm.cpp @@ -19,6 +19,8 @@ std::string llvm::wasm::toString(wasm::WasmSymbolType type) { return "WASM_SYMBOL_TYPE_DATA"; case wasm::WASM_SYMBOL_TYPE_SECTION: return "WASM_SYMBOL_TYPE_SECTION"; + case wasm::WASM_SYMBOL_TYPE_EVENT: + return "WASM_SYMBOL_TYPE_EVENT"; } llvm_unreachable("unknown symbol type"); } -- cgit v1.2.3