aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ObjectYAML/WasmEmitter.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2024-08-19 21:52:17 -0700
committerGitHub <noreply@github.com>2024-08-19 21:52:17 -0700
commit2a6136e552d24b6bf665c42a6e32efc0b2d88fbf (patch)
treeb7d9248a47553484ea96fd958bd0cbc7482f385b /llvm/lib/ObjectYAML/WasmEmitter.cpp
parent5403123197f8e331d3c2c24d82439ca1fe7e702d (diff)
downloadllvm-upstream/main.zip
llvm-upstream/main.tar.gz
llvm-upstream/main.tar.bz2
[llvm-objcopy][WebAssembly] Allow --strip-debug to operate on relocatable files. (#102978)upstream/main
This change is enough to allow `--strip-debug` to work on object files, without breaking the relocation information or symbol table. A more complete version of this change would instead reconstruct the symbol table and relocation sections, but that is much larger change. Bug: #102002
Diffstat (limited to 'llvm/lib/ObjectYAML/WasmEmitter.cpp')
-rw-r--r--llvm/lib/ObjectYAML/WasmEmitter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ObjectYAML/WasmEmitter.cpp b/llvm/lib/ObjectYAML/WasmEmitter.cpp
index 9b8fd11..4f38492 100644
--- a/llvm/lib/ObjectYAML/WasmEmitter.cpp
+++ b/llvm/lib/ObjectYAML/WasmEmitter.cpp
@@ -604,7 +604,8 @@ bool WasmWriter::writeWasm(raw_ostream &OS) {
if (auto S = dyn_cast<WasmYAML::CustomSection>(Sec.get()))
SecName = S->Name;
if (!Checker.isValidSectionOrder(Sec->Type, SecName)) {
- reportError("out of order section type: " + Twine(Sec->Type));
+ reportError("out of order section type: " +
+ wasm::sectionTypeToString(Sec->Type));
return false;
}
encodeULEB128(Sec->Type, OS);