summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Wilson <nicholas@nicholaswilson.me.uk>2018-03-05 12:28:01 +0000
committerNicholas Wilson <nicholas@nicholaswilson.me.uk>2018-03-05 12:28:01 +0000
commit6705c00f4d1d24b4eea49b6006f830ff02395263 (patch)
tree18d2d7f68b8b9b820ffb93f6176d82ba88c94d80
parent959e7371180b14465e88ac4c1961f749800badb6 (diff)
downloadbcm5719-llvm-6705c00f4d1d24b4eea49b6006f830ff02395263.tar.gz
bcm5719-llvm-6705c00f4d1d24b4eea49b6006f830ff02395263.zip
[WebAssembly] Fix tests with invalid yaml (required CODE section missing)
Differential Revision: https://reviews.llvm.org/D44023 llvm-svn: 326692
-rw-r--r--llvm/test/ObjectYAML/wasm/export_section.yaml8
-rw-r--r--llvm/test/ObjectYAML/wasm/function_section.yaml8
-rw-r--r--llvm/test/ObjectYAML/wasm/start_section.yaml15
3 files changed, 28 insertions, 3 deletions
diff --git a/llvm/test/ObjectYAML/wasm/export_section.yaml b/llvm/test/ObjectYAML/wasm/export_section.yaml
index 5e0d6d46a0d..af72f136811 100644
--- a/llvm/test/ObjectYAML/wasm/export_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/export_section.yaml
@@ -38,6 +38,14 @@ Sections:
- Name: table_export
Kind: TABLE
Index: 0
+ - Type: CODE
+ Functions:
+ - Index: 0
+ Locals:
+ Body: 0B
+ - Index: 1
+ Locals:
+ Body: 0B
...
# CHECK: --- !WASM
# CHECK: FileHeader:
diff --git a/llvm/test/ObjectYAML/wasm/function_section.yaml b/llvm/test/ObjectYAML/wasm/function_section.yaml
index 0db0afd2d0e..d3161445295 100644
--- a/llvm/test/ObjectYAML/wasm/function_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/function_section.yaml
@@ -14,6 +14,14 @@ Sections:
- I32
- Type: FUNCTION
FunctionTypes: [ 1, 0 ]
+ - Type: CODE
+ Functions:
+ - Index: 0
+ Locals:
+ Body: 0B
+ - Index: 1
+ Locals:
+ Body: 0B
...
# CHECK: --- !WASM
# CHECK: FileHeader:
diff --git a/llvm/test/ObjectYAML/wasm/start_section.yaml b/llvm/test/ObjectYAML/wasm/start_section.yaml
index 7d5e5964395..5d57c1b7a05 100644
--- a/llvm/test/ObjectYAML/wasm/start_section.yaml
+++ b/llvm/test/ObjectYAML/wasm/start_section.yaml
@@ -7,14 +7,23 @@ Sections:
- Type: TYPE
Signatures:
- Index: 0
- ReturnType: I32
+ ReturnType: NORESULT
ParamTypes:
- - F32
- - F32
- Type: FUNCTION
FunctionTypes: [ 0, 0, 0 ]
- Type: START
StartFunction: 1
+ - Type: CODE
+ Functions:
+ - Index: 0
+ Locals:
+ Body: 0B
+ - Index: 1
+ Locals:
+ Body: 0B
+ - Index: 2
+ Locals:
+ Body: 0B
...
# CHECK: --- !WASM
# CHECK: FileHeader:
OpenPOWER on IntegriCloud