diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 0cfe7a0..01b042c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2380,8 +2380,10 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (D->hasAttr<ArmLocallyStreamingAttr>()) B.addAttribute("aarch64_pstate_sm_body"); - if (D->hasAttr<ArmNewZAAttr>()) - B.addAttribute("aarch64_pstate_za_new"); + if (auto *Attr = D->getAttr<ArmNewAttr>()) { + if (Attr->isNewZA()) + B.addAttribute("aarch64_pstate_za_new"); + } // Track whether we need to add the optnone LLVM attribute, // starting with the default for this optimization level. |