-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FMV] mangling of forward-declared multi-versioned callee differs between gcc and clang #81043
Comments
@llvm/issue-subscribers-clang-codegen Author: Jon Roelofs (jroelofs)
https://clang.godbolt.org/z/zeeTxd3va
Note how clang calls it |
Note that gcc/clang match for |
I think it's because of this: llvm-project/clang/lib/CodeGen/CodeGenModule.cpp Lines 4392 to 4400 in b1ac052
|
https://clang.godbolt.org/z/zeeTxd3va
Note how clang calls it
_Z3foov.ifunc
, and gcc refers to it as_Z3foov
. IMO gcc's behavior is the desirable one: it lets you forward-declare foo in a header without having to promise that the implementation is multi-versioned. This is useful for libraries that have to provide a stable ABI to be able to adopt FMV in the implementation of those interfaces, without having to write an excessive number of shims.The text was updated successfully, but these errors were encountered: