OSDN Git Service

[WebAssembly] Add return type annotations in fast isel.
authorDan Gohman <dan433584@gmail.com>
Mon, 9 Jan 2017 23:09:38 +0000 (23:09 +0000)
committerDan Gohman <dan433584@gmail.com>
Mon, 9 Jan 2017 23:09:38 +0000 (23:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291498 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyFastISel.cpp

index 529540e..bc7020f 100644 (file)
@@ -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;
 }