[all-commits] [llvm/llvm-project] 1813fd: [WebAssembly] Emit clangast in custom section alig...
Yuta Saito via All-commits
all-commits at lists.llvm.org
Tue Oct 19 15:50:47 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9
https://github.com/llvm/llvm-project/commit/1813fde9cc0b56cee42d9b82e6f22fa00a59cdf9
Author: Yuta Saito <kateinoigakukun at gmail.com>
Date: 2021-10-19 (Tue, 19 Oct 2021)
Changed paths:
M clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
A clang/test/PCH/pch-wasm.c
M llvm/lib/MC/WasmObjectWriter.cpp
A llvm/test/MC/WebAssembly/custom-section-alignment.ll
Log Message:
-----------
[WebAssembly] Emit clangast in custom section aligned by 4 bytes
Emit __clangast in custom section instead of named data segment
to find it while iterating sections.
This could be avoided if all data segements (the wasm sense) were
represented as their own sections (in the llvm sense).
This can be resolved by https://github.com/WebAssembly/tool-conventions/issues/138
And the on-disk hashtable in clangast needs to be aligned by 4 bytes,
so add paddings in name length field in custom section header.
The length of clangast section name can be represented in 1 byte
by leb128, and possible maximum pads are 3 bytes, so the section
name length won't be invalid in theory.
Fixes https://bugs.llvm.org/show_bug.cgi?id=35928
Differential Revision: https://reviews.llvm.org/D74531
More information about the All-commits
mailing list