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 origin/main HEAD --extensions cpp,h -- 
bolt/include/bolt/Core/BinaryFunction.h bolt/include/bolt/Core/MCPlusBuilder.h 
bolt/lib/Core/BinaryEmitter.cpp bolt/lib/Core/BinaryFunction.cpp 
bolt/lib/Passes/FixRelaxationPass.cpp bolt/lib/Passes/LongJmp.cpp 
bolt/lib/Passes/ProfileQualityStats.cpp bolt/lib/Rewrite/RewriteInstance.cpp 
bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h 
b/bolt/include/bolt/Core/MCPlusBuilder.h
index bd7ff278e..feadbacc5 100644
--- a/bolt/include/bolt/Core/MCPlusBuilder.h
+++ b/bolt/include/bolt/Core/MCPlusBuilder.h
@@ -1791,8 +1791,7 @@ public:
   /// Replace Immediate values in PLT entry to symbol reference
   virtual bool handlePLTEntry(InstructionIterator Begin,
                               InstructionIterator End,
-                              const MCSymbol *PLTSymbol,
-                              MCContext *Ctx) {
+                              const MCSymbol *PLTSymbol, MCContext *Ctx) {
     llvm_unreachable("not implemented");
     return false;
   }
diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp
index bfe21cb84..e37d83707 100644
--- a/bolt/lib/Core/BinaryEmitter.cpp
+++ b/bolt/lib/Core/BinaryEmitter.cpp
@@ -279,7 +279,7 @@ void BinaryEmitter::emitFunctions() {
   if (BC.usesBTI()) {
     std::vector<BinaryFunction *> PLTFunctions = BC.getOutputBinaryFunctions();
     llvm::erase_if(PLTFunctions,
-                  [](BinaryFunction *BF) { return !BF->isPLTFunction(); });
+                   [](BinaryFunction *BF) { return !BF->isPLTFunction(); });
 
     const bool OriginalAllowAutoPadding = Streamer.getAllowAutoPadding();
     for (BinaryFunction *BF : PLTFunctions) {
diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index 4051f8d9d..0d027f61c 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -4465,8 +4465,7 @@ void BinaryFunction::disassemblePLT(InstructionListType 
&Instructions) {
                               getPLTSymbol(), BC.Ctx.get())) {
     if (opts::Verbosity)
       outs() << "BOLT-INFO: can't handle plt entry in function "
-             << getPrintName() << " for entry "
-             << getPLTSymbol() << "\n";
+             << getPrintName() << " for entry " << getPLTSymbol() << "\n";
     // Reset symbolizer for the disassembler.
     BC.SymbolicDisAsm->setSymbolizer(nullptr);
     return;
diff --git a/bolt/lib/Passes/FixRelaxationPass.cpp 
b/bolt/lib/Passes/FixRelaxationPass.cpp
index d4b2fbd7d..3654b900c 100644
--- a/bolt/lib/Passes/FixRelaxationPass.cpp
+++ b/bolt/lib/Passes/FixRelaxationPass.cpp
@@ -68,8 +68,8 @@ Error FixRelaxations::runOnFunctions(BinaryContext &BC) {
   };
 
   ParallelUtilities::runOnEachFunction(
-      BC, ParallelUtilities::SchedulingPolicy::SP_INST_LINEAR, WorkFun, 
SkipFunc,
-      "FixRelaxations");
+      BC, ParallelUtilities::SchedulingPolicy::SP_INST_LINEAR, WorkFun,
+      SkipFunc, "FixRelaxations");
   return Error::success();
 }
 
diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp 
b/bolt/lib/Rewrite/RewriteInstance.cpp
index a76d5af11..d1fb42199 100644
--- a/bolt/lib/Rewrite/RewriteInstance.cpp
+++ b/bolt/lib/Rewrite/RewriteInstance.cpp
@@ -1921,10 +1921,9 @@ void 
RewriteInstance::disassemblePLTSectionAArch64(BinarySection &Section) {
         break;
       EntrySize += InstrSize;
       if (BC->MIB->isIndirectBranch(Instruction)) {
-        TargetAddress = BC->MIB->analyzePLTEntry(Instruction,
-                                                 Instructions.begin(),
-                                                 Instructions.end(),
-                                                 EntryAddress);
+        TargetAddress =
+            BC->MIB->analyzePLTEntry(Instruction, Instructions.begin(),
+                                     Instructions.end(), EntryAddress);
       }
       Instructions.emplace_back(Instruction);
       InstrOffset += InstrSize;
@@ -3650,8 +3649,7 @@ void RewriteInstance::disassembleFunctions() {
   llvm::transform(llvm::make_second_range(BC->getBinaryFunctions()),
                   std::back_inserter(BFs),
                   [](BinaryFunction &BF) { return &BF; });
-  llvm::erase_if(BFs,
-                 [](BinaryFunction *BF) { return BF->isPLTFunction(); });
+  llvm::erase_if(BFs, [](BinaryFunction *BF) { return BF->isPLTFunction(); });
   for (BinaryFunction *BF : BFs) {
     BinaryFunction &Function = *BF;
 
@@ -3711,14 +3709,13 @@ void RewriteInstance::disassembleFunctions() {
   }
 
   if (opts::PrintAll || opts::PrintDisasm) {
-      std::for_each(BC->getBinaryFunctions().begin(),
-                    BC->getBinaryFunctions().end(),
-          [&](auto& BFI) {
-            BinaryFunction &Function = BFI.second;
-              if (Function.isPLTFunction())
-                Function.print(BC->outs(), "after disassembly");
-          });
-    }
+    std::for_each(BC->getBinaryFunctions().begin(),
+                  BC->getBinaryFunctions().end(), [&](auto &BFI) {
+                    BinaryFunction &Function = BFI.second;
+                    if (Function.isPLTFunction())
+                      Function.print(BC->outs(), "after disassembly");
+                  });
+  }
 
   BC->processInterproceduralReferences();
   BC->populateJumpTables();
diff --git a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp 
b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
index 2ca51940d..6440726f1 100644
--- a/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
+++ b/bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
@@ -1731,10 +1731,8 @@ public:
     PLTFunction.dump();
   }
 
-  bool handlePLTEntry(InstructionIterator Begin,
-                      InstructionIterator End,
-                      const MCSymbol *PLTSymbol,
-                      MCContext *Ctx) override {
+  bool handlePLTEntry(InstructionIterator Begin, InstructionIterator End,
+                      const MCSymbol *PLTSymbol, MCContext *Ctx) override {
     int64_t Val;
     int Count = 0;
     for (auto I = Begin; I != End; ++I) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/173571
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to