[PATCH] D44184: Write DWARF data into WASM object file
Yury Delendik via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 12 11:18:39 PDT 2018
yurydelendik added inline comments.
================
Comment at: include/llvm/Object/RelocVisitor.h:323
+
+ uint64_t visitWasm(uint32_t Rel, RelocationRef R, uint64_t Value) {
+ if (ObjToVisit.getArch() == Triple::wasm32) {
----------------
sbc100 wrote:
> Where is this RelocVistor change used? Can this be a separate change perhaps?
This is needed to make llvm-dwarfdump not fail. It can be added in the separate change.
================
Comment at: lib/Object/WasmObjectFile.cpp:1237
+symbol_iterator WasmObjectFile::getRelocationSymbol(DataRefImpl Ref) const {
+ const wasm::WasmRelocation &Rel = getWasmRelocation(Ref);
+ DataRefImpl Sym;
----------------
sbc100 wrote:
> Is this needed as part of this change?
>
> On thing to note is that Rel.Index is not always a symbol. For the TYPE_INDEX relocation types its a type index. We might want to revisit this in order to be consistent.
The change is needed for llvm-dwarfdump tool to not fail.
Repository:
rL LLVM
https://reviews.llvm.org/D44184
More information about the llvm-commits
mailing list