[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 19 12:20:44 PST 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 f0dcf3240dffe3767c7f3a2e2da5b92ae9fd1bef 8f5ef58d51aac7b91faf9e9b6e56eda137bad9ce --extensions h,cpp -- clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/OSTargets.h clang/lib/Basic/Targets/X86.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Basic/Targets/AArch64.cpp b/clang/lib/Basic/Targets/AArch64.cpp
index d8aef4837f..dd5d033afd 100644
--- a/clang/lib/Basic/Targets/AArch64.cpp
+++ b/clang/lib/Basic/Targets/AArch64.cpp
@@ -1538,9 +1538,8 @@ void AArch64leTargetInfo::setDataLayout() {
"n32:64-S128-Fn32",
"_");
} else if (getTriple().isUEFI() && getTriple().isOSBinFormatCOFF()) {
- resetDataLayout(
- "e-m:w-p270:32:32-p271:32:32-p272:64:64-p:64:64-i32:32-"
- "i64:64-i128:128-n32:64-S128-Fn32");
+ resetDataLayout("e-m:w-p270:32:32-p271:32:32-p272:64:64-p:64:64-i32:32-"
+ "i64:64-i128:128-n32:64-S128-Fn32");
} else
resetDataLayout("e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-"
"i64:64-i128:128-n32:64-S128-Fn32");
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h
index bb72a92b1c..1d6fe468af 100644
--- a/clang/lib/Basic/Targets/X86.h
+++ b/clang/lib/Basic/Targets/X86.h
@@ -713,8 +713,8 @@ public:
X86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
: X86TargetInfo(Triple, Opts) {
const bool IsX32 = getTriple().isX32();
- bool IsWinCOFF =
- (getTriple().isOSWindows() || getTriple().isUEFI()) && getTriple().isOSBinFormatCOFF();
+ bool IsWinCOFF = (getTriple().isOSWindows() || getTriple().isUEFI()) &&
+ getTriple().isOSBinFormatCOFF();
LongWidth = LongAlign = PointerWidth = PointerAlign = IsX32 ? 32 : 64;
LongDoubleWidth = 128;
LongDoubleAlign = 128;
``````````
</details>
https://github.com/llvm/llvm-project/pull/120632
More information about the cfe-commits
mailing list