diff --git a/lld/test/wasm/corrupted.wasm.test b/lld/test/wasm/corrupted.wasm.test index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@(readULEB128(Ctx)); if (Ty != wasm::ValType::EXTERNREF) { - return make_error("Invalid type for ref.null", + return make_error("invalid type for ref.null", object_error::parse_failed); } break; } default: - return make_error("Invalid opcode in init_expr", + return make_error("invalid opcode in init_expr", object_error::parse_failed); } uint8_t EndOpcode = readOpcode(Ctx); if (EndOpcode != wasm::WASM_OPCODE_END) { - return make_error("Invalid init_expr", + return make_error("invalid init_expr", object_error::parse_failed); } return Error::success(); @@ -228,10 +228,10 @@ LLVM_DEBUG(dbgs() << "readSection type=" << Section.Type << "\n"); uint32_t Size = readVaruint32(Ctx); if (Size == 0) - return make_error("Zero length section", + return make_error("zero length section", object_error::parse_failed); if (Ctx.Ptr + Size > Ctx.End) - return make_error("Section too large", + return make_error("section too large", object_error::parse_failed); if (Section.Type == wasm::WASM_SEC_CUSTOM) { WasmObjectFile::ReadContext SectionCtx; @@ -247,7 +247,7 @@ } if (!Checker.isValidSectionOrder(Section.Type, Section.Name)) { - return make_error("Out of order section type: " + + return make_error("out of order section type: " + llvm::to_string(Section.Type), object_error::parse_failed); } @@ -262,8 +262,8 @@ ErrorAsOutParameter ErrAsOutParam(&Err); Header.Magic = getData().substr(0, 4); if (Header.Magic != StringRef("\0asm", 4)) { - Err = - make_error("Bad magic number", object_error::parse_failed); + Err = make_error("invalid magic number", + object_error::parse_failed); return; } @@ -273,14 +273,15 @@ Ctx.End = Ctx.Start + getData().size(); if (Ctx.Ptr + 4 > Ctx.End) { - Err = make_error("Missing version number", + Err = make_error("missing version number", object_error::parse_failed); return; } Header.Version = readUint32(Ctx); if (Header.Version != wasm::WasmVersion) { - Err = make_error("Bad version number", + Err = make_error("invalid version number: " + + Twine(Header.Version), object_error::parse_failed); return; } @@ -333,7 +334,7 @@ return parseDataCountSection(Ctx); default: return make_error( - "Invalid section type: " + Twine(Sec.Type), object_error::parse_failed); + "invalid section type: " + Twine(Sec.Type), object_error::parse_failed); } } @@ -359,7 +360,7 @@ llvm::DenseSet SeenGlobals; llvm::DenseSet SeenSegments; if (FunctionTypes.size() && !SeenCodeSection) { - return make_error("Names must come after code section", + return make_error("names must come after code section", object_error::parse_failed); } @@ -379,9 +380,9 @@ if (Type == wasm::WASM_NAMES_FUNCTION) { if (!SeenFunctions.insert(Index).second) return make_error( - "Function named more than once", object_error::parse_failed); + "function named more than once", object_error::parse_failed); if (!isValidFunctionIndex(Index) || Name.empty()) - return make_error("Invalid name entry", + return make_error("invalid name entry", object_error::parse_failed); if (isDefinedFunctionIndex(Index)) @@ -389,18 +390,18 @@ } else if (Type == wasm::WASM_NAMES_GLOBAL) { nameType = wasm::NameType::GLOBAL; if (!SeenGlobals.insert(Index).second) - return make_error("Global named more than once", + return make_error("global named more than once", object_error::parse_failed); if (!isValidGlobalIndex(Index) || Name.empty()) - return make_error("Invalid name entry", + return make_error("invalid name entry", object_error::parse_failed); } else { nameType = wasm::NameType::DATA_SEGMENT; if (!SeenSegments.insert(Index).second) return make_error( - "Segment named more than once", object_error::parse_failed); + "segment named more than once", object_error::parse_failed); if (Index > DataSegments.size()) - return make_error("Invalid named data segment", + return make_error("invalid named data segment", object_error::parse_failed); } DebugNames.push_back(wasm::WasmDebugName{nameType, Index, Name}); @@ -415,11 +416,11 @@ } if (Ctx.Ptr != SubSectionEnd) return make_error( - "Name sub-section ended prematurely", object_error::parse_failed); + "name sub-section ended prematurely", object_error::parse_failed); } if (Ctx.Ptr != Ctx.End) - return make_error("Name section ended prematurely", + return make_error("name section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -428,14 +429,14 @@ HasLinkingSection = true; if (FunctionTypes.size() && !SeenCodeSection) { return make_error( - "Linking data must come after code section", + "linking data must come after code section", object_error::parse_failed); } LinkingData.Version = readVaruint32(Ctx); if (LinkingData.Version != wasm::WasmMetadataVersion) { return make_error( - "Unexpected metadata version: " + Twine(LinkingData.Version) + + "unexpected metadata version: " + Twine(LinkingData.Version) + " (Expected: " + Twine(wasm::WasmMetadataVersion) + ")", object_error::parse_failed); } @@ -456,7 +457,7 @@ case wasm::WASM_SEGMENT_INFO: { uint32_t Count = readVaruint32(Ctx); if (Count > DataSegments.size()) - return make_error("Too many segment names", + return make_error("too many segment names", object_error::parse_failed); for (uint32_t I = 0; I < Count; I++) { DataSegments[I].Data.Name = readString(Ctx); @@ -473,7 +474,7 @@ Init.Priority = readVaruint32(Ctx); Init.Symbol = readVaruint32(Ctx); if (!isValidFunctionSymbol(Init.Symbol)) - return make_error("Invalid function symbol: " + + return make_error("invalid function symbol: " + Twine(Init.Symbol), object_error::parse_failed); LinkingData.InitFunctions.emplace_back(Init); @@ -490,10 +491,10 @@ } if (Ctx.Ptr != Ctx.End) return make_error( - "Linking sub-section ended prematurely", object_error::parse_failed); + "linking sub-section ended prematurely", object_error::parse_failed); } if (Ctx.Ptr != OrigEnd) - return make_error("Linking section ended prematurely", + return make_error("linking section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -647,7 +648,7 @@ if ((Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) != wasm::WASM_SYMBOL_BINDING_LOCAL) return make_error( - "Section symbols must have local binding", + "section symbols must have local binding", object_error::parse_failed); Info.ElementIndex = readVaruint32(Ctx); // Use somewhat unique section name as symbol name. @@ -693,7 +694,7 @@ } default: - return make_error("Invalid symbol type: " + + return make_error("invalid symbol type: " + Twine(unsigned(Info.Kind)), object_error::parse_failed); } @@ -701,7 +702,7 @@ if ((Info.Flags & wasm::WASM_SYMBOL_BINDING_MASK) != wasm::WASM_SYMBOL_BINDING_LOCAL && !SymbolNames.insert(Info.Name).second) - return make_error("Duplicate symbol name " + + return make_error("duplicate symbol name " + Twine(Info.Name), object_error::parse_failed); LinkingData.SymbolTable.emplace_back(Info); @@ -719,13 +720,13 @@ for (unsigned ComdatIndex = 0; ComdatIndex < ComdatCount; ++ComdatIndex) { StringRef Name = readString(Ctx); if (Name.empty() || !ComdatSet.insert(Name).second) - return make_error("Bad/duplicate COMDAT name " + + return make_error("bad/duplicate COMDAT name " + Twine(Name), object_error::parse_failed); LinkingData.Comdats.emplace_back(Name); uint32_t Flags = readVaruint32(Ctx); if (Flags != 0) - return make_error("Unsupported COMDAT flags", + return make_error("unsupported COMDAT flags", object_error::parse_failed); uint32_t EntryCount = readVaruint32(Ctx); @@ -734,14 +735,14 @@ unsigned Index = readVaruint32(Ctx); switch (Kind) { default: - return make_error("Invalid COMDAT entry type", + return make_error("invalid COMDAT entry type", object_error::parse_failed); case wasm::WASM_COMDAT_DATA: if (Index >= DataSegments.size()) return make_error( "COMDAT data index out of range", object_error::parse_failed); if (DataSegments[Index].Data.Comdat != UINT32_MAX) - return make_error("Data segment in two COMDATs", + return make_error("data segment in two COMDATs", object_error::parse_failed); DataSegments[Index].Data.Comdat = ComdatIndex; break; @@ -750,7 +751,7 @@ return make_error( "COMDAT function index out of range", object_error::parse_failed); if (getDefinedFunction(Index).Comdat != UINT32_MAX) - return make_error("Function in two COMDATs", + return make_error("function in two COMDATs", object_error::parse_failed); getDefinedFunction(Index).Comdat = ComdatIndex; break; @@ -760,7 +761,7 @@ "COMDAT section index out of range", object_error::parse_failed); if (Sections[Index].Type != wasm::WASM_SEC_CUSTOM) return make_error( - "Non-custom section in a COMDAT", object_error::parse_failed); + "non-custom section in a COMDAT", object_error::parse_failed); Sections[Index].Comdat = ComdatIndex; break; } @@ -776,7 +777,7 @@ StringRef FieldName = readString(Ctx); if (!FieldsSeen.insert(FieldName).second) return make_error( - "Producers section does not have unique fields", + "producers section does not have unique fields", object_error::parse_failed); std::vector> *ProducerVec = nullptr; if (FieldName == "language") { @@ -787,7 +788,7 @@ ProducerVec = &ProducerInfo.SDKs; } else { return make_error( - "Producers section field is not named one of language, processed-by, " + "producers section field is not named one of language, processed-by, " "or sdk", object_error::parse_failed); } @@ -798,14 +799,14 @@ StringRef Version = readString(Ctx); if (!ProducersSeen.insert(Name).second) { return make_error( - "Producers section contains repeated producer", + "producers section contains repeated producer", object_error::parse_failed); } ProducerVec->emplace_back(std::string(Name), std::string(Version)); } } if (Ctx.Ptr != Ctx.End) - return make_error("Producers section ended prematurely", + return make_error("producers section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -822,20 +823,20 @@ case wasm::WASM_FEATURE_PREFIX_DISALLOWED: break; default: - return make_error("Unknown feature policy prefix", + return make_error("unknown feature policy prefix", object_error::parse_failed); } Feature.Name = std::string(readString(Ctx)); if (!FeaturesSeen.insert(Feature.Name).second) return make_error( - "Target features section contains repeated feature \"" + + "target features section contains repeated feature \"" + Feature.Name + "\"", object_error::parse_failed); TargetFeatures.push_back(Feature); } if (Ctx.Ptr != Ctx.End) return make_error( - "Target features section ended prematurely", + "target features section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -843,7 +844,7 @@ Error WasmObjectFile::parseRelocSection(StringRef Name, ReadContext &Ctx) { uint32_t SectionIndex = readVaruint32(Ctx); if (SectionIndex >= Sections.size()) - return make_error("Invalid section index", + return make_error("invalid section index", object_error::parse_failed); WasmSection &Section = Sections[SectionIndex]; uint32_t RelocCount = readVaruint32(Ctx); @@ -855,7 +856,7 @@ Reloc.Type = type; Reloc.Offset = readVaruint32(Ctx); if (Reloc.Offset < PreviousOffset) - return make_error("Relocations not in offset order", + return make_error("relocations not in offset order", object_error::parse_failed); PreviousOffset = Reloc.Offset; Reloc.Index = readVaruint32(Ctx); @@ -867,17 +868,17 @@ case wasm::R_WASM_TABLE_INDEX_I64: case wasm::R_WASM_TABLE_INDEX_REL_SLEB: if (!isValidFunctionSymbol(Reloc.Index)) - return make_error("Bad relocation function index", - object_error::parse_failed); + return make_error( + "invalid relocation function index", object_error::parse_failed); break; case wasm::R_WASM_TABLE_NUMBER_LEB: if (!isValidTableSymbol(Reloc.Index)) - return make_error("Bad relocation table index", + return make_error("invalid relocation table index", object_error::parse_failed); break; case wasm::R_WASM_TYPE_INDEX_LEB: if (Reloc.Index >= Signatures.size()) - return make_error("Bad relocation type index", + return make_error("invalid relocation type index", object_error::parse_failed); break; case wasm::R_WASM_GLOBAL_INDEX_LEB: @@ -886,17 +887,17 @@ if (!isValidGlobalSymbol(Reloc.Index) && !isValidDataSymbol(Reloc.Index) && !isValidFunctionSymbol(Reloc.Index)) - return make_error("Bad relocation global index", + return make_error("invalid relocation global index", object_error::parse_failed); break; case wasm::R_WASM_GLOBAL_INDEX_I32: if (!isValidGlobalSymbol(Reloc.Index)) - return make_error("Bad relocation global index", + return make_error("invalid relocation global index", object_error::parse_failed); break; case wasm::R_WASM_EVENT_INDEX_LEB: if (!isValidEventSymbol(Reloc.Index)) - return make_error("Bad relocation event index", + return make_error("invalid relocation event index", object_error::parse_failed); break; case wasm::R_WASM_MEMORY_ADDR_LEB: @@ -905,7 +906,7 @@ case wasm::R_WASM_MEMORY_ADDR_REL_SLEB: case wasm::R_WASM_MEMORY_ADDR_TLS_SLEB: if (!isValidDataSymbol(Reloc.Index)) - return make_error("Bad relocation data index", + return make_error("invalid relocation data index", object_error::parse_failed); Reloc.Addend = readVarint32(Ctx); break; @@ -914,31 +915,32 @@ case wasm::R_WASM_MEMORY_ADDR_I64: case wasm::R_WASM_MEMORY_ADDR_REL_SLEB64: if (!isValidDataSymbol(Reloc.Index)) - return make_error("Bad relocation data index", + return make_error("invalid relocation data index", object_error::parse_failed); Reloc.Addend = readVarint64(Ctx); break; case wasm::R_WASM_FUNCTION_OFFSET_I32: if (!isValidFunctionSymbol(Reloc.Index)) - return make_error("Bad relocation function index", - object_error::parse_failed); + return make_error( + "invalid relocation function index", object_error::parse_failed); Reloc.Addend = readVarint32(Ctx); break; case wasm::R_WASM_FUNCTION_OFFSET_I64: if (!isValidFunctionSymbol(Reloc.Index)) - return make_error("Bad relocation function index", - object_error::parse_failed); + return make_error( + "invalid relocation function index", object_error::parse_failed); Reloc.Addend = readVarint64(Ctx); break; case wasm::R_WASM_SECTION_OFFSET_I32: if (!isValidSectionSymbol(Reloc.Index)) - return make_error("Bad relocation section index", - object_error::parse_failed); + return make_error( + "invalid relocation section index", object_error::parse_failed); Reloc.Addend = readVarint32(Ctx); break; default: - return make_error( - "Bad relocation type: " + Twine(type), object_error::parse_failed); + return make_error("invalid relocation type: " + + Twine(type), + object_error::parse_failed); } // Relocations must fit inside the section, and must appear in order. They @@ -960,13 +962,13 @@ Reloc.Type == wasm::R_WASM_FUNCTION_OFFSET_I64) Size = 8; if (Reloc.Offset + Size > EndOffset) - return make_error("Bad relocation offset", + return make_error("invalid relocation offset", object_error::parse_failed); Section.Relocations.push_back(Reloc); } if (Ctx.Ptr != Ctx.End) - return make_error("Reloc section ended prematurely", + return make_error("reloc section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1001,7 +1003,7 @@ wasm::WasmSignature Sig; uint8_t Form = readUint8(Ctx); if (Form != wasm::WASM_TYPE_FUNC) { - return make_error("Invalid signature type", + return make_error("invalid signature type", object_error::parse_failed); } uint32_t ParamCount = readVaruint32(Ctx); @@ -1018,7 +1020,7 @@ Signatures.push_back(std::move(Sig)); } if (Ctx.Ptr != Ctx.End) - return make_error("Type section ended prematurely", + return make_error("type section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1052,7 +1054,7 @@ auto ElemType = Im.Table.ElemType; if (ElemType != wasm::WASM_TYPE_FUNCREF && ElemType != wasm::WASM_TYPE_EXTERNREF) - return make_error("Invalid table element type", + return make_error("invalid table element type", object_error::parse_failed); break; } @@ -1062,13 +1064,13 @@ Im.Event.SigIndex = readVarint32(Ctx); break; default: - return make_error("Unexpected import kind", + return make_error("unexpected import kind", object_error::parse_failed); } Imports.push_back(Im); } if (Ctx.Ptr != Ctx.End) - return make_error("Import section ended prematurely", + return make_error("import section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1081,12 +1083,12 @@ while (Count--) { uint32_t Type = readVaruint32(Ctx); if (Type >= NumTypes) - return make_error("Invalid function type", + return make_error("invalid function type", object_error::parse_failed); FunctionTypes.push_back(Type); } if (Ctx.Ptr != Ctx.End) - return make_error("Function section ended prematurely", + return make_error("function section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1103,12 +1105,12 @@ auto ElemType = Tables.back().Type.ElemType; if (ElemType != wasm::WASM_TYPE_FUNCREF && ElemType != wasm::WASM_TYPE_EXTERNREF) { - return make_error("Invalid table element type", + return make_error("invalid table element type", object_error::parse_failed); } } if (Ctx.Ptr != Ctx.End) - return make_error("Table section ended prematurely", + return make_error("table section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1123,7 +1125,7 @@ Memories.push_back(Limits); } if (Ctx.Ptr != Ctx.End) - return make_error("Memory section ended prematurely", + return make_error("memory section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1141,7 +1143,7 @@ } if (Ctx.Ptr != Ctx.End) - return make_error("Event section ended prematurely", + return make_error("event section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1160,7 +1162,7 @@ Globals.push_back(Global); } if (Ctx.Ptr != Ctx.End) - return make_error("Global section ended prematurely", + return make_error("global section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1177,31 +1179,31 @@ case wasm::WASM_EXTERNAL_FUNCTION: if (!isDefinedFunctionIndex(Ex.Index)) - return make_error("Invalid function export", + return make_error("invalid function export", object_error::parse_failed); getDefinedFunction(Ex.Index).ExportName = Ex.Name; break; case wasm::WASM_EXTERNAL_GLOBAL: if (!isValidGlobalIndex(Ex.Index)) - return make_error("Invalid global export", + return make_error("invalid global export", object_error::parse_failed); break; case wasm::WASM_EXTERNAL_EVENT: if (!isValidEventIndex(Ex.Index)) - return make_error("Invalid event export", + return make_error("invalid event export", object_error::parse_failed); break; case wasm::WASM_EXTERNAL_MEMORY: case wasm::WASM_EXTERNAL_TABLE: break; default: - return make_error("Unexpected export kind", + return make_error("unexpected export kind", object_error::parse_failed); } Exports.push_back(Ex); } if (Ctx.Ptr != Ctx.End) - return make_error("Export section ended prematurely", + return make_error("export section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1286,7 +1288,7 @@ Error WasmObjectFile::parseStartSection(ReadContext &Ctx) { StartFunction = readVaruint32(Ctx); if (!isValidFunctionIndex(StartFunction)) - return make_error("Invalid start function", + return make_error("invalid start function", object_error::parse_failed); return Error::success(); } @@ -1296,7 +1298,7 @@ CodeSection = Sections.size(); uint32_t FunctionCount = readVaruint32(Ctx); if (FunctionCount != FunctionTypes.size()) { - return make_error("Invalid function count", + return make_error("invalid function count", object_error::parse_failed); } @@ -1328,7 +1330,7 @@ assert(Ctx.Ptr == FunctionEnd); } if (Ctx.Ptr != Ctx.End) - return make_error("Code section ended prematurely", + return make_error("code section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1340,7 +1342,7 @@ wasm::WasmElemSegment Segment; Segment.TableIndex = readVaruint32(Ctx); if (Segment.TableIndex != 0) { - return make_error("Invalid TableIndex", + return make_error("invalid TableIndex", object_error::parse_failed); } if (Error Err = readInitExpr(Segment.Offset, Ctx)) @@ -1352,7 +1354,7 @@ ElemSegments.push_back(Segment); } if (Ctx.Ptr != Ctx.End) - return make_error("Elem section ended prematurely", + return make_error("elem section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1362,7 +1364,7 @@ uint32_t Count = readVaruint32(Ctx); if (DataCount && Count != DataCount.getValue()) return make_error( - "Number of data segments does not match DataCount section"); + "number of data segments does not match DataCount section"); DataSegments.reserve(Count); while (Count--) { WasmSegment Segment; @@ -1380,7 +1382,7 @@ } uint32_t Size = readVaruint32(Ctx); if (Size > (size_t)(Ctx.End - Ctx.Ptr)) - return make_error("Invalid segment size", + return make_error("invalid segment size", object_error::parse_failed); Segment.Data.Content = ArrayRef(Ctx.Ptr, Size); // The rest of these Data fields are set later, when reading in the linking @@ -1393,7 +1395,7 @@ DataSegments.push_back(Segment); } if (Ctx.Ptr != Ctx.End) - return make_error("Data section ended prematurely", + return make_error("data section ended prematurely", object_error::parse_failed); return Error::success(); } @@ -1521,7 +1523,7 @@ return SymbolRef::ST_Other; } - llvm_unreachable("Unknown WasmSymbol::SymbolType"); + llvm_unreachable("unknown WasmSymbol::SymbolType"); return SymbolRef::ST_Other; } @@ -1556,7 +1558,7 @@ case wasm::WASM_SYMBOL_TYPE_TABLE: return TableSection; default: - llvm_unreachable("Unknown WasmSymbol::SymbolType"); + llvm_unreachable("unknown WasmSymbol::SymbolType"); } } diff --git a/llvm/test/Object/wasm-bad-metadata-version.yaml b/llvm/test/Object/wasm-bad-metadata-version.yaml --- a/llvm/test/Object/wasm-bad-metadata-version.yaml +++ b/llvm/test/Object/wasm-bad-metadata-version.yaml @@ -8,4 +8,4 @@ Name: linking Version: 0 -# CHECK: {{.*}}: Unexpected metadata version: 0 (Expected: 2) +# CHECK: {{.*}}: unexpected metadata version: 0 (Expected: 2) diff --git a/llvm/test/Object/wasm-bad-reloc-type.test b/llvm/test/Object/wasm-bad-reloc-type.test --- a/llvm/test/Object/wasm-bad-reloc-type.test +++ b/llvm/test/Object/wasm-bad-reloc-type.test @@ -1,3 +1,3 @@ RUN: not llvm-objdump -s %p/Inputs/WASM/bad-reloc-type.wasm 2>&1 | FileCheck %s -CHECK: Bad relocation type: 63 +CHECK: invalid relocation type: 63 diff --git a/llvm/test/Object/wasm-bad-symbol-type.test b/llvm/test/Object/wasm-bad-symbol-type.test --- a/llvm/test/Object/wasm-bad-symbol-type.test +++ b/llvm/test/Object/wasm-bad-symbol-type.test @@ -1,3 +1,3 @@ RUN: not llvm-objdump -s %p/Inputs/WASM/bad-symbol-type.wasm 2>&1 | FileCheck %s -CHECK: Invalid symbol type: 63 +CHECK: invalid symbol type: 63 diff --git a/llvm/test/Object/wasm-duplicate-name.test b/llvm/test/Object/wasm-duplicate-name.test --- a/llvm/test/Object/wasm-duplicate-name.test +++ b/llvm/test/Object/wasm-duplicate-name.test @@ -26,4 +26,4 @@ Name: b ... -# CHECK: {{.*}}: Function named more than once +# CHECK: {{.*}}: function named more than once diff --git a/llvm/test/Object/wasm-invalid-file.yaml b/llvm/test/Object/wasm-invalid-file.yaml --- a/llvm/test/Object/wasm-invalid-file.yaml +++ b/llvm/test/Object/wasm-invalid-file.yaml @@ -13,10 +13,10 @@ # Append a section size that extends beyond the end of the file # RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-SIZE -# CHECK-SECTION-SIZE: '{{.*}}.wasm': Section too large +# CHECK-SECTION-SIZE: '{{.*}}.wasm': section too large # RUN: yaml2obj %s -o %t.wasm # # Append an section with invalid type (type 0x20, size 0x1, content 0x0) # RUN: echo -e -n "\x20\x01\x00" >> %t.wasm # RUN: not llvm-objdump -h %t.wasm 2>&1 | FileCheck %s -check-prefix=CHECK-SECTION-TYPE -# CHECK-SECTION-TYPE: '{{.*}}.wasm': Invalid section type: 32 +# CHECK-SECTION-TYPE: '{{.*}}.wasm': invalid section type: 32 diff --git a/llvm/test/Object/wasm-invalid-section-order.test b/llvm/test/Object/wasm-invalid-section-order.test --- a/llvm/test/Object/wasm-invalid-section-order.test +++ b/llvm/test/Object/wasm-invalid-section-order.test @@ -1,5 +1,5 @@ # RUN: not obj2yaml %p/Inputs/WASM/invalid-section-order.wasm 2>&1 | FileCheck %s -# CHECK: {{.*}}: Out of order section type: 10 +# CHECK: {{.*}}: out of order section type: 10 # Inputs/WASM/invalid-section-order.wasm is generated from this ll file, by # modifying WasmObjectWriter to incorrectly write the data section before the diff --git a/llvm/test/Object/wasm-invalid-start.test b/llvm/test/Object/wasm-invalid-start.test --- a/llvm/test/Object/wasm-invalid-start.test +++ b/llvm/test/Object/wasm-invalid-start.test @@ -7,4 +7,4 @@ - Type: START StartFunction: 0 -# CHECK: {{.*}}: Invalid start function +# CHECK: {{.*}}: invalid start function diff --git a/llvm/test/Object/wasm-missing-version.test b/llvm/test/Object/wasm-missing-version.test --- a/llvm/test/Object/wasm-missing-version.test +++ b/llvm/test/Object/wasm-missing-version.test @@ -1,2 +1,2 @@ # RUN: not llvm-objdump -h %p/Inputs/WASM/missing-version.wasm 2>&1 | FileCheck %s -# CHECK: {{.*}}: Missing version number +# CHECK: {{.*}}: missing version number diff --git a/llvm/test/ObjectYAML/wasm/header_invalid_version.yaml b/llvm/test/ObjectYAML/wasm/header_invalid_version.yaml --- a/llvm/test/ObjectYAML/wasm/header_invalid_version.yaml +++ b/llvm/test/ObjectYAML/wasm/header_invalid_version.yaml @@ -3,4 +3,4 @@ FileHeader: Version: 0x00000002 ... -# CHECK: Error reading file: : Bad version number +# CHECK: Error reading file: : invalid version number: 2 diff --git a/llvm/test/ObjectYAML/wasm/invalid_export.yaml b/llvm/test/ObjectYAML/wasm/invalid_export.yaml --- a/llvm/test/ObjectYAML/wasm/invalid_export.yaml +++ b/llvm/test/ObjectYAML/wasm/invalid_export.yaml @@ -10,4 +10,4 @@ Kind: FUNCTION Index: 0x00000001 -# CHECK: Error reading file: : Invalid function export +# CHECK: Error reading file: : invalid function export diff --git a/llvm/test/ObjectYAML/wasm/producers_section_repeat.yaml b/llvm/test/ObjectYAML/wasm/producers_section_repeat.yaml --- a/llvm/test/ObjectYAML/wasm/producers_section_repeat.yaml +++ b/llvm/test/ObjectYAML/wasm/producers_section_repeat.yaml @@ -11,4 +11,4 @@ - Name: C++ Version: C++17 ... -# CHECK: Producers section contains repeated producer +# CHECK: producers section contains repeated producer diff --git a/llvm/test/tools/llvm-objdump/wasm/wasm-corrupt-section.test b/llvm/test/tools/llvm-objdump/wasm/wasm-corrupt-section.test --- a/llvm/test/tools/llvm-objdump/wasm/wasm-corrupt-section.test +++ b/llvm/test/tools/llvm-objdump/wasm/wasm-corrupt-section.test @@ -1,2 +1,2 @@ # RUN: not llvm-objdump -h %p/Inputs/corrupt-section.wasm 2>&1 | FileCheck %s -# CHECK: '{{.*}}corrupt-section.wasm': Section too large +# CHECK: '{{.*}}corrupt-section.wasm': section too large diff --git a/llvm/test/tools/llvm-readobj/wasm/wasm-invalid.test b/llvm/test/tools/llvm-readobj/wasm/wasm-invalid.test --- a/llvm/test/tools/llvm-readobj/wasm/wasm-invalid.test +++ b/llvm/test/tools/llvm-readobj/wasm/wasm-invalid.test @@ -4,4 +4,4 @@ FileHeader: Version: 0x0000000c -# CHECK: error: '': Bad version number +# CHECK: error: '': invalid version number: 12