[PATCH] D155808: [clang][driver] Missing the condition in IsARMBigEndain function.
Simi Pallipurath via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 24 05:26:08 PDT 2023
simpal01 updated this revision to Diff 543484.
simpal01 added a comment.
Addressing review comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155808/new/
https://reviews.llvm.org/D155808
Files:
clang/lib/Driver/ToolChains/BareMetal.cpp
clang/lib/Driver/ToolChains/Gnu.cpp
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -424,12 +424,13 @@
if (Args.hasArg(options::OPT_s))
CmdArgs.push_back("-s");
- if (Triple.isARM() || Triple.isThumb() || Triple.isAArch64()) {
+ if (Triple.isARM() || Triple.isThumb()) {
bool IsBigEndian = arm::isARMBigEndian(Triple, Args);
if (IsBigEndian)
arm::appendBE8LinkFlag(Args, CmdArgs, Triple);
- IsBigEndian = IsBigEndian || Arch == llvm::Triple::aarch64_be;
CmdArgs.push_back(IsBigEndian ? "-EB" : "-EL");
+ } else if (Triple.isAArch64()) {
+ CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
// Most Android ARM64 targets should enable the linker fix for erratum
Index: clang/lib/Driver/ToolChains/BareMetal.cpp
===================================================================
--- clang/lib/Driver/ToolChains/BareMetal.cpp
+++ clang/lib/Driver/ToolChains/BareMetal.cpp
@@ -443,12 +443,13 @@
CmdArgs.push_back("-Bstatic");
- if (Triple.isARM() || Triple.isThumb() || Triple.isAArch64()) {
+ if (Triple.isARM() || Triple.isThumb()) {
bool IsBigEndian = arm::isARMBigEndian(Triple, Args);
if (IsBigEndian)
arm::appendBE8LinkFlag(Args, CmdArgs, Triple);
- IsBigEndian = IsBigEndian || Arch == llvm::Triple::aarch64_be;
CmdArgs.push_back(IsBigEndian ? "-EB" : "-EL");
+ } else if (Triple.isAArch64()) {
+ CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
Args.AddAllArgs(CmdArgs,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155808.543484.patch
Type: text/x-patch
Size: 1622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230724/f6e20f30/attachment.bin>
More information about the cfe-commits
mailing list