[lld] [lld] Use position independent argument parsing for Unresolved Symbol (PR #123950)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 06:58:57 PST 2025
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 f0909e3a991c7b6515cafe2ce0a069a856fe675f 2a3df1e409358390c808fe9eac9ca8d8a7a4320e --extensions cpp -- lld/ELF/Driver.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 94f12d30a36..534be393976 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -764,10 +764,10 @@ static void setUnresolvedSymbolPolicy(Ctx &ctx, opt::InputArgList &args) {
opt::Arg *no_allow_shlib = args.getLastArg(OPT_no_allow_shlib_undefined);
if (allow_shlib != nullptr && no_allow_shlib != nullptr)
- diagShlib = allow_shlib->getIndex() < no_allow_shlib->getIndex() ?
- true : false;
+ diagShlib =
+ allow_shlib->getIndex() < no_allow_shlib->getIndex() ? true : false;
else if (allow_shlib != nullptr || no_allow_shlib != nullptr)
- diagShlib = no_allow_shlib != nullptr ? true : false;
+ diagShlib = no_allow_shlib != nullptr ? true : false;
ctx.arg.unresolvedSymbols =
diagRegular ? errorOrWarn : UnresolvedPolicy::Ignore;
``````````
</details>
https://github.com/llvm/llvm-project/pull/123950
More information about the llvm-commits
mailing list