[llvm] [ORC][MachO] Support common load commands in the platform's mach-o header builder (PR #77965)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 11:20:52 PST 2024
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 b58f91a31b288a7078e3b0330bd92bb14f3649de 7715285c14d9bff07e316ed332673848c45a4992 -- llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h b/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
index a5825bccb0..45dd5fcbeb 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/MachOBuilder.h
@@ -78,24 +78,24 @@ public:
template <typename... ArgTs>
MachOBuilderLoadCommand(ArgTs &&...Args)
- : MachOBuilderLoadCommand(std::forward<ArgTs>(Args)...) {}
+ : MachOBuilderLoadCommand(std::forward<ArgTs>(Args)...) {}
};
template <>
struct MachOBuilderLoadCommand<MachO::LC_ID_DYLIB>
- : public MachOBuilderLoadCommandImplBase<MachO::LC_ID_DYLIB> {
+ : public MachOBuilderLoadCommandImplBase<MachO::LC_ID_DYLIB> {
MachOBuilderLoadCommand(std::string Name, uint32_t Timestamp,
- uint32_t CurrentVersion,
- uint32_t CompatibilityVersion)
- : MachOBuilderLoadCommandImplBase(
- MachO::dylib{24, Timestamp, CurrentVersion, CompatibilityVersion}),
- Name(std::move(Name)) {
+ uint32_t CurrentVersion,
+ uint32_t CompatibilityVersion)
+ : MachOBuilderLoadCommandImplBase(
+ MachO::dylib{24, Timestamp, CurrentVersion, CompatibilityVersion}),
+ Name(std::move(Name)) {
cmdsize += (this->Name.size() + 1 + 3) & ~0x3;
}
size_t write(MutableArrayRef<char> Buf, size_t Offset,
- bool SwapStruct) override {
+ bool SwapStruct) override {
Offset = writeMachOStruct(Buf, Offset, rawStruct(), SwapStruct);
strcpy(Buf.data() + Offset, Name.data());
return Offset + ((Name.size() + 1 + 3) & ~0x3);
``````````
</details>
https://github.com/llvm/llvm-project/pull/77965
More information about the llvm-commits
mailing list