[llvm] [BOLT] Add --pad-funcs-before=func:n (PR #117924)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 13:08:35 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 0ccc3895126aaa94ae3fe890fcca0ad69658bbab 1070183c9d1251c8e5892f2b9de1043147bf0744 --extensions cpp -- bolt/lib/Core/BinaryEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp
index 456f380c1b..be21f1f363 100644
--- a/bolt/lib/Core/BinaryEmitter.cpp
+++ b/bolt/lib/Core/BinaryEmitter.cpp
@@ -54,13 +54,11 @@ FunctionPadSpec("pad-funcs",
cl::Hidden,
cl::cat(BoltCategory));
-static cl::list<std::string>
-FunctionPadBeforeSpec("pad-funcs-before",
- cl::CommaSeparated,
- cl::desc("list of functions to pad with amount of bytes"),
- cl::value_desc("func1:pad1,func2:pad2,func3:pad3,..."),
- cl::Hidden,
- cl::cat(BoltCategory));
+static cl::list<std::string> FunctionPadBeforeSpec(
+ "pad-funcs-before", cl::CommaSeparated,
+ cl::desc("list of functions to pad with amount of bytes"),
+ cl::value_desc("func1:pad1,func2:pad2,func3:pad3,..."), cl::Hidden,
+ cl::cat(BoltCategory));
static cl::opt<bool> MarkFuncs(
"mark-funcs",
@@ -376,9 +374,9 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
// Since the padding is not executed, it can be null bytes.
Streamer.emitFill(Padding, 0);
- Function.setMaxSize(Function.getMaxSize()+Padding);
- Function.setSize(Function.getSize()+Padding);
- Function.setImageSize(Function.getImageSize()+Padding);
+ Function.setMaxSize(Function.getMaxSize() + Padding);
+ Function.setSize(Function.getSize() + Padding);
+ Function.setImageSize(Function.getImageSize() + Padding);
}
MCContext &Context = Streamer.getContext();
``````````
</details>
https://github.com/llvm/llvm-project/pull/117924
More information about the llvm-commits
mailing list