[clang] [NFC][Clang] Move functions of BranchProtectionInfo out of line (PR #98329)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 10 07:35:06 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 08ce14732d528ab70309f334446d39782f2f07c0 b1e113f76b289aa8a7d4459314a0dbffb313cb51 -- clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/TargetInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp
index a99ddd081a..cc4b79b433 100644
--- a/clang/lib/Basic/TargetInfo.cpp
+++ b/clang/lib/Basic/TargetInfo.cpp
@@ -1007,13 +1007,15 @@ void TargetInfo::copyAuxTarget(const TargetInfo *Aux) {
*Target = *Src;
}
-void TargetInfo::BranchProtectionInfo::setFnAttributes(llvm::Function &F) const {
+void TargetInfo::BranchProtectionInfo::setFnAttributes(
+ llvm::Function &F) const {
llvm::AttrBuilder FuncAttrs(F.getContext());
setFnAttributes(FuncAttrs);
F.addFnAttrs(FuncAttrs);
}
-void TargetInfo::BranchProtectionInfo::setFnAttributes(llvm::AttrBuilder &FuncAttrs) const {
+void TargetInfo::BranchProtectionInfo::setFnAttributes(
+ llvm::AttrBuilder &FuncAttrs) const {
if (SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) {
FuncAttrs.addAttribute("sign-return-address", getSignReturnAddrStr());
FuncAttrs.addAttribute("sign-return-address-key", getSignKeyStr());
``````````
</details>
https://github.com/llvm/llvm-project/pull/98329
More information about the cfe-commits
mailing list