aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorBolshakov <bolsh.andrey@yandex.ru>2023-05-03 17:31:05 -0700
committerEli Friedman <efriedma@quicinc.com>2023-05-03 18:20:16 -0700
commitcd93532dfc455255cb2fa553090d14aaa52b106b (patch)
treee4d18061a5c8f1f75428723b5e1fb80db32a312a /llvm/lib/Object/ELFObjectFile.cpp
parente48826e016e2f427f3b7b1274166aa9aa0ea7f4f (diff)
downloadllvm-cd93532dfc455255cb2fa553090d14aaa52b106b.zip
llvm-cd93532dfc455255cb2fa553090d14aaa52b106b.tar.gz
llvm-cd93532dfc455255cb2fa553090d14aaa52b106b.tar.bz2
[MS ABI] Fix C++ mangling references to declarations.
Several issues have been discovered and (hopefully) fixed here: - Reference NTTPs should be mangled in the same manner as pointer ones. - Pointer fields of class type NTTPs should be treated in the same manner as reference ones. - Pointer-to-member fields of class type NTTPs should be treated differently compared to pointer-to-member NTTPs. Tests on pointer-to-member-function NTTP class fields added. - Correct mangling of pointers to anonymous union members. - A bug in mangling references to subobjects fixed. - Mangling array subscripts and base class members in references to subobjects. Reference NTTP mangling was done back in 2013 in e8fdc06e0dab2e7b98339425dbe369e27e2092a3, and Microsoft might change mangling algorithm since then. But class type NTTPs are introduced only in C++20, and the test was written in b637148ecb62b900872b34eedd78b923bb43c378. It is strange if the MS ABI had been realy changed, because Microsoft claims that they maintain ABI stability since VS 2015. I've tested both on v142 and v143 MSVC toolsets, and they show the same behavior on the test cases which are changed in this PR. But pointer-to-member-function NTTP class field mangling has been actually changed, because it was erroneous in v142, leading to name collisions. Moreover, pointer-to-member mangling with conversions across class hierarchy has been enabled. Differential Revision: https://reviews.llvm.org/D146386
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions