summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/globl.ll
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-12-01 00:11:15 +0000
committerDerek Schuff <dschuff@google.com>2016-12-01 00:11:15 +0000
commit7747d703e3c21ed2d16ba88382b8fb57389e085a (patch)
tree815a2902d55a838231949ddffbb9fd702c46fdff /llvm/test/CodeGen/WebAssembly/globl.ll
parentdba63a7e5c935506ac6f943c8592f773dcee4ea6 (diff)
downloadbcm5719-llvm-7747d703e3c21ed2d16ba88382b8fb57389e085a.tar.gz
bcm5719-llvm-7747d703e3c21ed2d16ba88382b8fb57389e085a.zip
[WebAssembly] Emit .import_global assembler directives
Support a new assembler directive, .import_global, to declare imported global variables (i.e. those with external linkage and no initializer). The linker turns these into wasm imports. Patch by Jacob Gravelle Differential Revision: https://reviews.llvm.org/D26875 llvm-svn: 288296
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/globl.ll')
-rw-r--r--llvm/test/CodeGen/WebAssembly/globl.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/globl.ll b/llvm/test/CodeGen/WebAssembly/globl.ll
index 91d3ade4666..3ebd3d88fb4 100644
--- a/llvm/test/CodeGen/WebAssembly/globl.ll
+++ b/llvm/test/CodeGen/WebAssembly/globl.ll
@@ -8,3 +8,7 @@ target triple = "wasm32-unknown-unknown"
define void @foo() {
ret void
}
+
+; Check import directives - must be at the end of the file
+; CHECK: .import_global bar{{$}}
+@bar = external global i32
OpenPOWER on IntegriCloud