[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 4 15:00:42 PDT 2021
rjmccall added a comment.
`std::addressof(&someFunction)` certainly ought to return a signed pointer under ptrauth, so if your goal here is to get a completely unadorned symbol address, I think you do need a different builtin, and it probably ought to return a `void*` to emphasize that it shouldn't be used as a normal value. Maybe it should even be semantically restricted to require a constant decl reference as its operand? Related and perhaps illuminating question: if it were implementable, would you also want to force the suppression of lazy-binding thunks and/or decorations like the THUMB bit?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108479/new/
https://reviews.llvm.org/D108479
More information about the cfe-commits
mailing list