[PATCH] D58472: [WebAssembly] Remove unneeded MCSymbolRefExpr variants
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 22 13:51:45 PST 2019
sbc100 marked an inline comment as done.
sbc100 added a comment.
In D58472#1407342 <https://reviews.llvm.org/D58472#1407342>, @dschuff wrote:
> IIRC this code goes back to when we were piggybacking on ELF, and is more-or-less there to match how those variants are used on ELF. I don't see any asm parser changes in this CL, but I could imagine that they would exist so that the assembler could know what kind of reloc to use even without any context or special knowledge of symbol types; does this change affect how asm is parsed? Maybe we've already added enough extra intelligence to the assembler that we don't need them.
You are correct. The @XXX is for the reloc type. When a symbol is referenced normally its just means that address of the symbol, but for things other than address (or normal refs) you need the @. That is why we still have the @TYPEINDEX for when you want the functions type, not its address. For any given symbol we already know the type and we can defined a default meaning when we the symbol. We don't need to decorate the default references IIUC.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58472/new/
https://reviews.llvm.org/D58472
More information about the llvm-commits
mailing list