[clang] [AArch64] Add missing ACLE predefined macros and update __ARM_ACLE. (PR #108857)
Daniel Kiss via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 10:16:20 PDT 2024
================
@@ -399,7 +399,14 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__AARCH64_CMODEL_" + CodeModel + "__");
// ACLE predefines. Many can only have one possible value on v8 AArch64.
- Builder.defineMacro("__ARM_ACLE", "200");
+ Builder.defineMacro("__ARM_ACLE_VERSION(year, quarter, patch)",
+ "100 * (year) + 10 * (quarter) + (patch)");
----------------
DanielKristofKiss wrote:
I'd add a surrounding parentheses to avoid precedence issues with the macro.
```suggestion
"(100 * (year) + 10 * (quarter) + (patch))");
```
https://github.com/llvm/llvm-project/pull/108857
More information about the cfe-commits
mailing list