From 83aa9c67c7b7dc9d8351ac7ca71fa412a84f5fba Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 1 Aug 2019 17:13:23 -0700 Subject: [PATCH] Replace throw() with noexcept. Unlike throw(), noexcept indicates that the function does not throw. Before C++17, throw() was equivalent to wrapping the function in a try {} catch { std::unexpected(); }. In C++17 throw() was made equivalent to noexcept and in C++20 throw() was removed. --- lib/llvm-backend/cpp/object_loader.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/llvm-backend/cpp/object_loader.hh b/lib/llvm-backend/cpp/object_loader.hh index 23b401634..7a410b2dc 100644 --- a/lib/llvm-backend/cpp/object_loader.hh +++ b/lib/llvm-backend/cpp/object_loader.hh @@ -192,7 +192,7 @@ void module_delete(WasmModule *module) { delete module; } bool invoke_trampoline(trampoline_t trampoline, void *ctx, void *func, void *params, void *results, WasmTrap::Type *trap_out, - box_any_t *user_error, void *invoke_env) throw() { + box_any_t *user_error, void *invoke_env) noexcept { try { trampoline(ctx, func, params, results); return true;