1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/ObjectYAML/wasm/global_section.yaml
Sam Clegg 9ebc8a13dc [WebAssembly] Explicitly specify function/global index space in YAML
These indexes are useful because they are not always zero based and
functions and globals are referenced elsewhere by their index.

This matches what we already do for the type index space.

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

llvm-svn: 322121
2018-01-09 21:38:53 +00:00

28 lines
708 B
YAML

# RUN: yaml2obj %s | obj2yaml | FileCheck %s
--- !WASM
FileHeader:
Version: 0x00000001
Sections:
- Type: GLOBAL
Globals:
- Index: 0
Type: I32
Mutable: false
InitExpr:
Opcode: I64_CONST
Value: -5
...
# CHECK: --- !WASM
# CHECK: FileHeader:
# CHECK: Version: 0x00000001
# CHECK: Sections:
# CHECK: - Type: GLOBAL
# CHECK: Globals:
# CHECK: - Index: 0
# CHECK: Type: I32
# CHECK: Mutable: false
# CHECK: InitExpr:
# CHECK: Opcode: I64_CONST
# CHECK: Value: -5
# CHECK: ...