WebAssembly: handle private/internal globals.
authorJF Bastien <jfb@google.com>
Wed, 26 Aug 2015 22:09:54 +0000 (22:09 +0000)
committerJF Bastien <jfb@google.com>
Wed, 26 Aug 2015 22:09:54 +0000 (22:09 +0000)
commit08bd0b92116468b52776a55e1fb9dcd479c4a42d
treeb79cc00390da1c340e4583c499b442996801af49
parent9c5b8a01177e6693e124f79df498c8bb199d3366
WebAssembly: handle private/internal globals.

Things of note:
 - Other linkage types aren't handled yet. We'll figure it out with dynamic linking.
 - Special LLVM globals are either ignored, or error out for now.
 - TLS isn't supported yet (WebAssembly will have threads later).
 - There currently isn't a syntax for alignment, I left it in a comment so it's easy to hook up.
 - Undef is convereted to whatever the type's appropriate null value is.
 - assert versus report_fatal_error: follow what other AsmPrinters do, and assert only on what should have been caught elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246092 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
test/CodeGen/WebAssembly/global.ll [new file with mode: 0644]