[WebAssembly] Make __attribute__((used)) not imply export.

Add an WASM_SYMBOL_NO_STRIP flag, so that __attribute__((used)) doesn't
need to imply exporting. When targeting Emscripten, have
WASM_SYMBOL_NO_STRIP imply exporting.

Differential Revision: https://reviews.llvm.org/D62542


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370415 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2019-08-29 22:40:00 +00:00
parent 25e4b8cca5
commit dd0b08abf0
12 changed files with 39 additions and 18 deletions
+3 -2
View File
@@ -10,8 +10,9 @@
using namespace llvm;
MCWasmObjectTargetWriter::MCWasmObjectTargetWriter(bool Is64Bit)
: Is64Bit(Is64Bit) {}
MCWasmObjectTargetWriter::MCWasmObjectTargetWriter(bool Is64Bit,
bool IsEmscripten)
: Is64Bit(Is64Bit), IsEmscripten(IsEmscripten) {}
// Pin the vtable to this object file
MCWasmObjectTargetWriter::~MCWasmObjectTargetWriter() = default;