[PATCH] D49517: [WebAssembly] Handle return type conversions in FixFunctionBitcasts pass

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 17:05:22 PDT 2018


sbc100 added a comment.

My goal here is not so much to make it "work" as to not produce invalid webassembly.     i.e. it should compile, even it if fails at runtime to do anything useful/expected.

The motivating use case is the way 'cmake' detects functions: https://github.com/Kitware/CMake/blob/master/Modules/CheckFunctionExists.c

I tries to compile this little program (but not run it) where the function in question is declared as "int XXX()" regardless of the actual signature.  This fails when detecting, for example `strtod` becasue the resulting wasm binary doesn't validate (which means wasm-emscripten-finalize can't load it which mean a link failure for emccc).


Repository:
  rL LLVM

https://reviews.llvm.org/D49517





More information about the llvm-commits mailing list