[PATCH] D7775: [IR] Avoid the need to prefix MS C++ symbols with '\01'

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 13:08:11 PDT 2018


rnk added inline comments.


================
Comment at: llvm/docs/LangRef.rst:1957
+      starting with ``?`` are not mangled in any way.
+    * ``w``: Windows COFF mangling: Similar to ``x``, except that normal C
+      symbols do not receive a ``_`` prefix.
----------------
smeenai wrote:
> To clarify, I assume `x` is used on x86 and `w` is used everywhere else. stdcall and fastcall are only a thing on x86, in which case `w` shouldn't be mangling them? (This is more confusing with the old version of the comment, but it's still ambiguous here.)
`__vectorcall` gets `@@N` on x64, so the way I think of it is, all these conventions get manglings on Windows, but `__fastcall` and `__stdcall` are ignored on x64. It just so happens that we need to do some of this ignoring in the IR mangler, but we could just as easily reject these CCs in the verifier since they should be meaningless for the target.


https://reviews.llvm.org/D7775





More information about the llvm-commits mailing list