[llvm] New tool 'llvm-elf2bin'. (NOT READY FOR REVIEW – NO TESTS) (PR #73625)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 01:27:57 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 1459c627f0bc1a4938b5b6a7f4c2bdc1f3ec6a2c 32eded2b00685a7468dad496d31e5533828cf853 -- llvm/tools/llvm-elf2bin/bin.cpp llvm/tools/llvm-elf2bin/elf.cpp llvm/tools/llvm-elf2bin/hex.cpp llvm/tools/llvm-elf2bin/llvm-elf2bin.cpp llvm/tools/llvm-elf2bin/llvm-elf2bin.h
``````````

</details>

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

``````````diff
diff --git a/llvm/tools/llvm-elf2bin/bin.cpp b/llvm/tools/llvm-elf2bin/bin.cpp
index 15044613aa..850939ea67 100644
--- a/llvm/tools/llvm-elf2bin/bin.cpp
+++ b/llvm/tools/llvm-elf2bin/bin.cpp
@@ -245,9 +245,9 @@ combined_prepare(InputObject &inobj, const std::vector<Segment> &segments_orig,
     for (; it != end; ++it) {
       const auto &prev = nonoverlapping.back(), curr = *it;
       if (curr.baseaddr - prev.baseaddr < prev.memsize)
-        fatal(inobj, Twine("segments at addresses 0x")
-              + Twine::utohexstr(prev.baseaddr) + " and 0x"
-              + Twine::utohexstr(curr.baseaddr) + " overlap");
+        fatal(inobj, Twine("segments at addresses 0x") +
+                         Twine::utohexstr(prev.baseaddr) + " and 0x" +
+                         Twine::utohexstr(curr.baseaddr) + " overlap");
       nonoverlapping.push_back(curr);
     }
   }
diff --git a/llvm/tools/llvm-elf2bin/llvm-elf2bin.h b/llvm/tools/llvm-elf2bin/llvm-elf2bin.h
index daebd8640b..73221e574d 100644
--- a/llvm/tools/llvm-elf2bin/llvm-elf2bin.h
+++ b/llvm/tools/llvm-elf2bin/llvm-elf2bin.h
@@ -162,7 +162,8 @@ void srec_write(InputObject &inobj, const std::string &outfile,
 /*
  * Error-reporting functions. These are all fatal.
  */
-[[noreturn]] void fatal(llvm::StringRef filename, llvm::Twine message, llvm::Error err);
+[[noreturn]] void fatal(llvm::StringRef filename, llvm::Twine message,
+                        llvm::Error err);
 [[noreturn]] void fatal(llvm::StringRef filename, llvm::Twine message);
 [[noreturn]] void fatal(InputObject &inobj, llvm::Twine message,
                         llvm::Error err);

``````````

</details>


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


More information about the llvm-commits mailing list