[llvm] [BOLT] [Passes] Fix two compile warnings in BOLT (PR #73086)
Ho Cheung via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 21:09:50 PST 2023
gz83 wrote:
> ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️
>
> You can test this locally with the following command:
> ```shell
> git-clang-format --diff 2c875719c841ff13b9b250e6ea97fc3e0aca2070 39d188b197b165898a3f2caaa819abdcf646c17d -- bolt/lib/Passes/IndirectCallPromotion.cpp bolt/lib/Passes/ReorderAlgorithm.cpp
> ```
>
> View the diff from clang-format here.
> ```diff
> diff --git a/bolt/lib/Passes/IndirectCallPromotion.cpp b/bolt/lib/Passes/IndirectCallPromotion.cpp
> index 555258f072..260b96ba02 100644
> --- a/bolt/lib/Passes/IndirectCallPromotion.cpp
> +++ b/bolt/lib/Passes/IndirectCallPromotion.cpp
> @@ -410,7 +410,8 @@ IndirectCallPromotion::maybeGetHotJumpTableTargets(BinaryBasicBlock &BB,
> << "BaseReg = " << BC.MRI->getName(BaseReg) << ", "
> << "IndexReg = " << BC.MRI->getName(IndexReg) << ", "
> << "DispValue = " << Twine::utohexstr(DispValue) << ", "
> - << "DispExpr = " << DispExpr << ", " << "MemLocInstr = ";
> + << "DispExpr = " << DispExpr << ", "
> + << "MemLocInstr = ";
> BC.printInstruction(dbgs(), *MemLocInstr, 0, &Function);
> dbgs() << "\n";
> });
> ```
I use `clang-format -i -style=file bolt\lib\Passes\IndirectCallPromotion.cpp` and `clang-format -i -style=file bolt\lib\Passes\ReorderAlgorithm.cpp` to format the code
https://github.com/llvm/llvm-project/pull/73086
More information about the llvm-commits
mailing list