[PATCH] D60836: [WebAssembly] Object: Improve error messages on invalid section
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 14:46:54 PDT 2019
sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, hiraditya, jgravelle-google, dschuff.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D60836
Files:
llvm/lib/Object/WasmObjectFile.cpp
Index: llvm/lib/Object/WasmObjectFile.cpp
===================================================================
--- llvm/lib/Object/WasmObjectFile.cpp
+++ llvm/lib/Object/WasmObjectFile.cpp
@@ -319,8 +319,8 @@
case wasm::WASM_SEC_DATACOUNT:
return parseDataCountSection(Ctx);
default:
- return make_error<GenericBinaryError>("Bad section type",
- object_error::parse_failed);
+ return make_error<GenericBinaryError>(
+ "Invalid section type: " + Twine(Sec.Type), object_error::parse_failed);
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60836.195632.patch
Type: text/x-patch
Size: 565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190417/1401ca81/attachment.bin>
More information about the llvm-commits
mailing list