[lld] [lld][COFF]Expose UnifiedLTO options (PR #69904)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 01:56:10 PDT 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 3651f377f632d9152f2bd8fc2f9302ec9f9bdd5e b908916f765a9106324f37a99097c1329ecafafe -- lld/COFF/Config.h lld/COFF/Driver.cpp lld/COFF/LTO.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lld/COFF/Config.h b/lld/COFF/Config.h
index 186fb1774..cbf3595b3 100644
--- a/lld/COFF/Config.h
+++ b/lld/COFF/Config.h
@@ -14,10 +14,10 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/LTO/LTO.h"
#include "llvm/Object/COFF.h"
#include "llvm/Support/CachePruning.h"
#include "llvm/Support/VirtualFileSystem.h"
-#include "llvm/LTO/LTO.h"
#include <cstdint>
#include <map>
#include <set>
@@ -25,9 +25,9 @@
namespace lld::coff {
+using llvm::StringRef;
using llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN;
using llvm::COFF::WindowsSubsystem;
-using llvm::StringRef;
using llvm::lto::LTO;
class DefinedAbsolute;
class StringChunk;
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp
index c559449ae..95c16a02e 100644
--- a/lld/COFF/LTO.cpp
+++ b/lld/COFF/LTO.cpp
@@ -126,8 +126,8 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) {
llvm::heavyweight_hardware_concurrency(ctx.config.thinLTOJobs));
}
- ltoObj = std::make_unique<lto::LTO>(createConfig(), backend,
- ctx.config.ltoPartitions,ctx.config.ltoKind);
+ ltoObj = std::make_unique<lto::LTO>(
+ createConfig(), backend, ctx.config.ltoPartitions, ctx.config.ltoKind);
}
BitcodeCompiler::~BitcodeCompiler() = default;
``````````
</details>
https://github.com/llvm/llvm-project/pull/69904
More information about the llvm-commits
mailing list