[clang] Fix objc_sel_{name,types} missing an underscore (PR #88713)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 22 16:01:49 PDT 2024
https://github.com/rjmccall commented:
At first, I was worried that this was an ABI break. Then I noticed the internal inconsistency within this single file, and so I became worried that it was an ABI *fix*. But then I noticed that the normal selector-emission code actually makes these strings hidden by default, and so now my guess is that the uniqueness of these strings is at best an optimization. Still, it's an optimization we should do.
There are actually three differences between the code emission here and the code emission in the "primary" paths in `GetConstantSelector` and `GetTypeString`:
- the primary path uses an underscore in the symbol name prefix
- the primary path adjusts the symbol name to avoid restricted characters in the target object file format
- the primary path generates hidden symbols
My assumption is that, on all three of these points, we should just do what the primary path would do. Please extract common functions as necessary in order to reuse the logic.
@davidchisnall, could you verify my reasoning here?
https://github.com/llvm/llvm-project/pull/88713
More information about the cfe-commits
mailing list