[lld] [lld][WebAssembly] Fix reported names of LTO output files (PR #138789)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 6 18:21:01 PDT 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 HEAD~1 HEAD --extensions cpp,h -- lld/wasm/LTO.cpp lld/wasm/LTO.h lld/wasm/SymbolTable.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lld/wasm/LTO.cpp b/lld/wasm/LTO.cpp
index 0c34c91bf..a877f0676 100644
--- a/lld/wasm/LTO.cpp
+++ b/lld/wasm/LTO.cpp
@@ -183,7 +183,7 @@ static void thinLTOCreateEmptyIndexFiles() {
 
 // Merge all the bitcode files we have seen, codegen the result
 // and return the resulting objects.
-SmallVector<InputFile*, 0> BitcodeCompiler::compile() {
+SmallVector<InputFile *, 0> BitcodeCompiler::compile() {
   unsigned maxTasks = ltoObj->getMaxTasks();
   buf.resize(maxTasks);
   files.resize(maxTasks);
@@ -234,7 +234,7 @@ SmallVector<InputFile*, 0> BitcodeCompiler::compile() {
   if (!ctx.arg.thinLTOCacheDir.empty())
     pruneCache(ctx.arg.thinLTOCacheDir, ctx.arg.thinLTOCachePolicy, files);
 
-  SmallVector<InputFile*, 0> ret;
+  SmallVector<InputFile *, 0> ret;
   for (unsigned i = 0; i != maxTasks; ++i) {
     StringRef objBuf = buf[i].second;
     StringRef bitcodeFilePath = buf[i].first;
diff --git a/lld/wasm/LTO.h b/lld/wasm/LTO.h
index b37cfc774..21b1d5902 100644
--- a/lld/wasm/LTO.h
+++ b/lld/wasm/LTO.h
@@ -45,7 +45,7 @@ public:
   ~BitcodeCompiler();
 
   void add(BitcodeFile &f);
-  SmallVector<InputFile*, 0> compile();
+  SmallVector<InputFile *, 0> compile();
 
 private:
   std::unique_ptr<llvm::lto::LTO> ltoObj;
diff --git a/lld/wasm/SymbolTable.cpp b/lld/wasm/SymbolTable.cpp
index 2d88639d4..91677b34e 100644
--- a/lld/wasm/SymbolTable.cpp
+++ b/lld/wasm/SymbolTable.cpp
@@ -87,7 +87,7 @@ void SymbolTable::compileBitcodeFiles() {
   for (BitcodeFile *f : ctx.bitcodeFiles)
     lto->add(*f);
 
-  for (auto& file : lto->compile()) {
+  for (auto &file : lto->compile()) {
     auto *obj = cast<ObjFile>(file);
     obj->parse(true);
     ctx.objectFiles.push_back(obj);

``````````

</details>


https://github.com/llvm/llvm-project/pull/138789


More information about the llvm-commits mailing list