[lld] [LLD][COFF] Support /DEPENDENTLOADFLAGS[:flags] (PR #71537)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 06:10:34 PST 2023
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 48f980c535ca9a4e2c00c56734e6d3346f4b0a86 41eaeb616e8e04dd41721c1303abfa6fe031ea33 -- lld/COFF/Config.h lld/COFF/Driver.cpp lld/COFF/Driver.h lld/COFF/DriverUtils.cpp lld/COFF/Writer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 6563b45830e6..bbbaba194e83 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -2180,7 +2180,8 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
parseFunctionPadMin(arg);
// Handle /dependentloadflag
- for (auto *arg : args.filtered(OPT_dependentloadflag, OPT_dependentloadflag_opt))
+ for (auto *arg :
+ args.filtered(OPT_dependentloadflag, OPT_dependentloadflag_opt))
parseDependentLoadFlags(arg);
if (tar) {
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index eb26241d5229..7c975cb51529 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -2281,8 +2281,7 @@ void Writer::changeLoadConfig() {
reinterpret_cast<coff_load_configuration32 *>(symBuf));
}
-template <typename T>
-void Writer::changeLoadConfigGuardData(T *loadConfig) {
+template <typename T> void Writer::changeLoadConfigGuardData(T *loadConfig) {
if (ctx.config.dependentLoadFlags)
loadConfig->DependentLoadFlags = ctx.config.dependentLoadFlags;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/71537
More information about the llvm-commits
mailing list