From: Dan Gohman Date: Mon, 9 Jan 2017 23:09:38 +0000 (+0000) Subject: [WebAssembly] Add return type annotations in fast isel. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3494169e90e9b8b4882709b844ef49103265ca09;p=llvm [WebAssembly] Add return type annotations in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291498 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/WebAssemblyFastISel.cpp b/lib/Target/WebAssembly/WebAssemblyFastISel.cpp index 529540ea4ed..bc7020fded8 100644 --- a/lib/Target/WebAssembly/WebAssemblyFastISel.cpp +++ b/lib/Target/WebAssembly/WebAssemblyFastISel.cpp @@ -663,6 +663,9 @@ bool WebAssemblyFastISel::fastLowerArguments() { for (auto const &Arg : F->args()) MFI->addParam(getLegalType(getSimpleType(Arg.getType()))); + if (!F->getReturnType()->isVoidTy()) + MFI->addResult(getLegalType(getSimpleType(F->getReturnType()))); + return true; }