__USER_LABEL_PREFIX__ is not a string (usually it is just _ if not
empty). It must be stringized for string concatenation to work.
Details
- Reviewers
aaron.ballman mstorsjo phosek
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The code only makes sense for some ELF platforms, not Mach-O platforms where __USER_LABEL_PREFIX__ is (usually) _.
What platforms are you building the code with and seeing a problem?
If we want to make some changes, likely we should just remove __USER_LABEL_PREFIX__.
(I'll take a vacation until 2023-04-10, so I will probably not respond in time.)
An out-of-tree target with an unusual combination ELF + non-empty __USER_LABEL_PREFIX__.
The prefix has only caused troubles; it will probably go away once I am able to build newlib using clang.
If we want to make some changes, likely we should just remove __USER_LABEL_PREFIX__.
I don't know much about the prefix, but I noticed that the same target may configure it differently depending on the target triple.
If you are sure this is always a no-op, I don't mind removing it. (I would still have to keep an extra _ for my target under #ifdef.)
Note that there is also builtins component using the same functionality, and it also looks like the prefix is always empty. Otherwise the bug would have been spotted earlier -- please see D147077.
The prefix has only caused troubles; it will probably go away once I am able to build newlib using clang.
Ah, no, it will have to stay.
Speaking in X86 terms:
eax: lea eax, [eax]
causes ambiguity. Same for my target. So the labels are prefixed with _.