Commit Graph

3 Commits

Author SHA1 Message Date
Sam Clegg 262e09018b [WebAssembly] Remove final -wasm component of target triple. NFC.
This has been the default for a while now.

llvm-svn: 332009
2018-05-10 17:59:41 +00:00
Sam Clegg 70683b2f75 [WebAssembly] Use inline target tripple in test cases
This is somewhat preferable since (in many cases) it allows llc
to be run directly on the .ll files without having to pass the
`-mtriple` argument.

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

llvm-svn: 323299
2018-01-24 03:29:47 +00:00
Sam Clegg d3052d5522 [WebAssembly] Add missing function exports and SYM_INFO to --relocatable output
When writing relocatable files we were exporting for all globals
(including file-local syms), but not for functions. Oops. To be
consistent with non-relocatable output, all symbols (file-local
and global) should be exported. Any symbol targetted by further
relocations needs to be exported. The lack of local function
exports was just an omission, I think.

Second bug: Local symbol names can collide, causing an illegal
Wasm file to be generated! Oops again. This only previously affected
producing relocatable output from two files, where each had a global
with the same name. We need to "budge" the symbol names for locals
that are exported on relocatable output.

Third bug: LLD's relocatable output wasn't writing out any symbol
flags! Thus the local globals weren't being marked as local, and
the hidden flag was also stripped...

Added tests to exercise colliding local names with/without
relocatable flag

Patch by Nicholas Wilson!

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

llvm-svn: 322908
2018-01-18 23:40:49 +00:00