[PATCH] D85685: [WIP] Support dwarf fission for wasm object files
Derek Schuff via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 16:39:26 PDT 2020
dschuff updated this revision to Diff 292055.
dschuff added a comment.
Get the right sections in the objects, add tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85685/new/
https://reviews.llvm.org/D85685
Files:
llvm/lib/MC/WasmObjectWriter.cpp
Index: llvm/lib/MC/WasmObjectWriter.cpp
===================================================================
--- llvm/lib/MC/WasmObjectWriter.cpp
+++ llvm/lib/MC/WasmObjectWriter.cpp
@@ -321,9 +321,8 @@
void executePostLayoutBinding(MCAssembler &Asm,
const MCAsmLayout &Layout) override;
- void prepareImports(SmallVectorImpl<wasm::WasmImport>& Imports,
- MCAssembler &Asm,
- const MCAsmLayout &Layout);
+ void prepareImports(SmallVectorImpl<wasm::WasmImport> &Imports,
+ MCAssembler &Asm, const MCAsmLayout &Layout);
uint64_t writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;
uint64_t writeOneObject(MCAssembler &Asm, const MCAsmLayout &Layout,
@@ -963,7 +962,7 @@
encodeULEB128(0, W->OS); // memory index
if ((Segment.InitFlags & wasm::WASM_SEGMENT_IS_PASSIVE) == 0) {
W->OS << char(Segment.Offset > INT32_MAX ? wasm::WASM_OPCODE_I64_CONST
- : wasm::WASM_OPCODE_I32_CONST);
+ : wasm::WASM_OPCODE_I32_CONST);
encodeSLEB128(Segment.Offset, W->OS); // offset
W->OS << char(wasm::WASM_OPCODE_END);
}
@@ -1198,9 +1197,9 @@
return true;
}
-void WasmObjectWriter::prepareImports(SmallVectorImpl<wasm::WasmImport>& Imports,
- MCAssembler &Asm,
- const MCAsmLayout &Layout) {
+void WasmObjectWriter::prepareImports(
+ SmallVectorImpl<wasm::WasmImport> &Imports, MCAssembler &Asm,
+ const MCAsmLayout &Layout) {
// For now, always emit the memory import, since loads and stores are not
// valid without it. In the future, we could perhaps be more clever and omit
// it if there are no loads or stores.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85685.292055.patch
Type: text/x-patch
Size: 1845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200915/5124b68e/attachment.bin>
More information about the cfe-commits
mailing list