amilendra added inline comments.
================ Comment at: clang/lib/Basic/Targets/ARM.cpp:391-392 + if (!Arch.empty() && !isBranchProtectionSupportedArch(Arch)) + return false; + ---------------- chill wrote: > On empty `Arch` it'd continue down the function, but we'd like to return > failure. I am having trouble getting the test `arm-branch-protection-attr-1.c` to work after these changes. `validateBranchProtection()` checks the combination of two parameters, the branch protection attribute and architecture. If the architecture is empty, like below, shouldn't the function to continue checking further than simply returning false? ``` __attribute__((target("branch-protection=bti"))) void btionly() {} ``` Or should I be using something else other than `CGM.getTarget().getTargetOpts().CPU` to get the architecture in `ARMTargetCodeGenInfo::setTargetAttributes`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115501/new/ https://reviews.llvm.org/D115501 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits