diff options
author | Fangrui Song <i@maskray.me> | 2025-04-08 09:09:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-08 09:09:19 -0700 |
commit | 26475f5bdd2f4a042b63fdf1ee62d6634872dee5 (patch) | |
tree | a50a73370b2b59daed7f32efa5c0d9fe07e7e71c /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | bb7ff134dc9eb72707400f00fb874a6a9e47597d (diff) | |
download | llvm-26475f5bdd2f4a042b63fdf1ee62d6634872dee5.zip llvm-26475f5bdd2f4a042b63fdf1ee62d6634872dee5.tar.gz llvm-26475f5bdd2f4a042b63fdf1ee62d6634872dee5.tar.bz2 |
[AArch64] Refactor @plt, @gotpcrel, and @AUTH to use parseDataExpr
Following PR #132569 (RISC-V), which added `parseDataExpr` for parsing
expressions in data directives (e.g., `.word`), this PR migrates AArch64
`@plt`, `@gotpcrel`, and `@AUTH` from the `parsePrimaryExpr` workaround
to `parseDataExpr`. The goal is to align with the GNU assembler model,
where relocation specifiers apply to the entire operand rather than
individual terms, reducing complexity-especially evident in `@AUTH`
parsing.
Note: AArch64 ELF lacks an official syntax for data directives
(#132570). A prefix notation might be a preferable future direction.
I recommend `%specifier(expr)`.
AsmParser's `@specifier` parsing is suboptimal, necessitating lexer
workarounds. `@` might appear multiple times in an operand.
We should not use `@` beyond the existing AArch64 Mach-O instruction
operands.
In the test elf-reloc-ptrauth.s, many errors are now reported at parse
time.
Pull Request: https://github.com/llvm/llvm-project/pull/134202
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions