forked from OSchip/llvm-project
5859a9ed80
Under emscripten, C code can take the address of a function implemented in Javascript (which is exposed via an import in wasm). Because imports do not have linear memory address in wasm, we need to generate a thunk to be the target of the indirect call; it call the import directly. To make this possible, LLVM needs to emit the type signatures for these functions, because they may not be called directly or referred to other than where the address is taken. This uses s new .s directive (.functype) which specifies the signature. Differential Revision: http://reviews.llvm.org/D20891 Re-apply r271599 but instead of bailing with an error when a declared function has multiple returns, replace it with a pointer argument. Also add the test case I forgot to 'git add' last time around. llvm-svn: 271703 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
WebAssemblyAsmBackend.cpp | ||
WebAssemblyELFObjectWriter.cpp | ||
WebAssemblyMCAsmInfo.cpp | ||
WebAssemblyMCAsmInfo.h | ||
WebAssemblyMCCodeEmitter.cpp | ||
WebAssemblyMCTargetDesc.cpp | ||
WebAssemblyMCTargetDesc.h | ||
WebAssemblyTargetStreamer.cpp | ||
WebAssemblyTargetStreamer.h |