Skip to content

Commit 84c6f32

Browse files
committed
[Object][WebAssembly] Update format of error messages
Error message should start with lowercase in accordance with https://llvm.org/docs/CodingStandards.html#error-and-warning-messages Differential Revision: https://reviews.llvm.org/D95239
1 parent a2914e0 commit 84c6f32

15 files changed

+106
-104
lines changed

lld/test/wasm/corrupted.wasm.test

16 Bytes
Binary file not shown.

llvm/lib/Object/WasmObjectFile.cpp

Lines changed: 92 additions & 90 deletions
Large diffs are not rendered by default.

llvm/test/Object/wasm-bad-metadata-version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Sections:
88
Name: linking
99
Version: 0
1010

11-
# CHECK: {{.*}}: Unexpected metadata version: 0 (Expected: 2)
11+
# CHECK: {{.*}}: unexpected metadata version: 0 (Expected: 2)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
RUN: not llvm-objdump -s %p/Inputs/WASM/bad-reloc-type.wasm 2>&1 | FileCheck %s
22

3-
CHECK: Bad relocation type: 63
3+
CHECK: invalid relocation type: 63
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
RUN: not llvm-objdump -s %p/Inputs/WASM/bad-symbol-type.wasm 2>&1 | FileCheck %s
22

3-
CHECK: Invalid symbol type: 63
3+
CHECK: invalid symbol type: 63

llvm/test/Object/wasm-duplicate-name.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ Sections:
2626
Name: b
2727
...
2828

29-
# CHECK: {{.*}}: Function named more than once
29+
# CHECK: {{.*}}: function named more than once

llvm/test/Object/wasm-invalid-file.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ FileHeader:
1313
# Append a section size that extends beyond the end of the file
1414
# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-SIZE
1515

16-
# CHECK-SECTION-SIZE: '{{.*}}.wasm': Section too large
16+
# CHECK-SECTION-SIZE: '{{.*}}.wasm': section too large
1717

1818
# RUN: yaml2obj %s -o %t.wasm
1919
# # Append an section with invalid type (type 0x20, size 0x1, content 0x0)
2020
# RUN: echo -e -n "\x20\x01\x00" >> %t.wasm
2121
# RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE
22-
# CHECK-SECTION-TYPE: '{{.*}}.wasm': Invalid section type: 32
22+
# CHECK-SECTION-TYPE: '{{.*}}.wasm': invalid section type: 32

llvm/test/Object/wasm-invalid-section-order.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: not obj2yaml %p/Inputs/WASM/invalid-section-order.wasm 2>&1 | FileCheck %s
2-
# CHECK: {{.*}}: Out of order section type: 10
2+
# CHECK: {{.*}}: out of order section type: 10
33

44
# Inputs/WASM/invalid-section-order.wasm is generated from this ll file, by
55
# modifying WasmObjectWriter to incorrectly write the data section before the

llvm/test/Object/wasm-invalid-start.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Sections:
77
- Type: START
88
StartFunction: 0
99

10-
# CHECK: {{.*}}: Invalid start function
10+
# CHECK: {{.*}}: invalid start function
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# RUN: not llvm-objdump -h %p/Inputs/WASM/missing-version.wasm 2>&1 | FileCheck %s
2-
# CHECK: {{.*}}: Missing version number
2+
# CHECK: {{.*}}: missing version number

0 commit comments

Comments
 (0)