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 h,cpp -- 
llvm/include/llvm/MC/MCLFI.h llvm/include/llvm/MC/MCLFIRewriter.h 
llvm/lib/MC/MCLFI.cpp llvm/lib/MC/MCLFIRewriter.cpp 
llvm/lib/MC/MCParser/LFIAsmParser.cpp clang/tools/driver/cc1as_main.cpp 
llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h 
llvm/include/llvm/MC/MCStreamer.h llvm/include/llvm/MC/TargetRegistry.h 
llvm/lib/MC/MCAsmStreamer.cpp llvm/lib/MC/MCObjectStreamer.cpp 
llvm/lib/MC/MCParser/AsmParser.cpp llvm/tools/llvm-mc/llvm-mc.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/llvm/include/llvm/MC/MCStreamer.h 
b/llvm/include/llvm/MC/MCStreamer.h
index aa7a457c3..72d4ba1e0 100644
--- a/llvm/include/llvm/MC/MCStreamer.h
+++ b/llvm/include/llvm/MC/MCStreamer.h
@@ -19,8 +19,8 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MCDirectives.h"
 #include "llvm/MC/MCDwarf.h"
-#include "llvm/MC/MCLinkerOptimizationHint.h"
 #include "llvm/MC/MCLFIRewriter.h"
+#include "llvm/MC/MCLinkerOptimizationHint.h"
 #include "llvm/MC/MCPseudoProbe.h"
 #include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCWinEH.h"
diff --git a/llvm/include/llvm/MC/TargetRegistry.h 
b/llvm/include/llvm/MC/TargetRegistry.h
index 70c38da62..88ec00e74 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -238,9 +238,10 @@ public:
       mca::InstrumentManager *(*)(const MCSubtargetInfo &STI,
                                   const MCInstrInfo &MCII);
 
-  using MCLFIRewriterCtorTy = MCLFIRewriter *(*)(
-      MCStreamer &S, std::unique_ptr<MCRegisterInfo> &&RegInfo,
-      std::unique_ptr<MCInstrInfo> &&InstInfo);
+  using MCLFIRewriterCtorTy =
+      MCLFIRewriter *(*)(MCStreamer & S,
+                         std::unique_ptr<MCRegisterInfo> &&RegInfo,
+                         std::unique_ptr<MCInstrInfo> &&InstInfo);
 
 private:
   /// Next - The next registered target in the linked list, maintained by the
@@ -602,8 +603,8 @@ public:
   }
 
   void createMCLFIRewriter(MCStreamer &S,
-      std::unique_ptr<MCRegisterInfo> &&RegInfo,
-      std::unique_ptr<MCInstrInfo> &&InstInfo) const {
+                           std::unique_ptr<MCRegisterInfo> &&RegInfo,
+                           std::unique_ptr<MCInstrInfo> &&InstInfo) const {
     if (MCLFIRewriterCtorFn)
       MCLFIRewriterCtorFn(S, std::move(RegInfo), std::move(InstInfo));
   }
@@ -1080,8 +1081,7 @@ struct TargetRegistry {
     T.InstrumentManagerCtorFn = Fn;
   }
 
-  static void RegisterMCLFIRewriter(Target &T,
-                                    Target::MCLFIRewriterCtorTy Fn) {
+  static void RegisterMCLFIRewriter(Target &T, Target::MCLFIRewriterCtorTy Fn) 
{
     T.MCLFIRewriterCtorFn = Fn;
   }
 
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 82e72fa26..a2e09caf7 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -2438,7 +2438,8 @@ void MCAsmStreamer::AddEncodingComment(const MCInst &Inst,
 
 void MCAsmStreamer::emitInstruction(const MCInst &Inst,
                                     const MCSubtargetInfo &STI) {
-  if (LFIRewriter && LFIRewriter->isEnabled() && 
LFIRewriter->rewriteInst(Inst, *this, STI))
+  if (LFIRewriter && LFIRewriter->isEnabled() &&
+      LFIRewriter->rewriteInst(Inst, *this, STI))
     return;
 
   if (CurFrag) {
diff --git a/llvm/lib/MC/MCLFI.cpp b/llvm/lib/MC/MCLFI.cpp
index 4e078f5fb..6082edac1 100644
--- a/llvm/lib/MC/MCLFI.cpp
+++ b/llvm/lib/MC/MCLFI.cpp
@@ -23,8 +23,8 @@ static const char NoteNamespace[] = "LFI";
 namespace llvm {
 
 cl::opt<bool> FlagEnableRewriting("lfi-enable-rewriter",
-                              cl::desc("Don't enable rewriting for LFI."),
-                              cl::init(true));
+                                  cl::desc("Don't enable rewriting for LFI."),
+                                  cl::init(true));
 
 void initializeLFIMCStreamer(MCStreamer &Streamer, MCContext &Ctx,
                              const Triple &TheTriple) {
@@ -48,8 +48,7 @@ void initializeLFIMCStreamer(MCStreamer &Streamer, MCContext 
&Ctx,
   if (FlagEnableRewriting) {
     TheTarget->createMCLFIRewriter(
         Streamer,
-        std::unique_ptr<MCRegisterInfo>(
-            TheTarget->createMCRegInfo(TheTriple)),
+        std::unique_ptr<MCRegisterInfo>(TheTarget->createMCRegInfo(TheTriple)),
         std::unique_ptr<MCInstrInfo>(TheTarget->createMCInstrInfo()));
   }
 
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index eef2baf21..cfc46d77d 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -391,7 +391,8 @@ bool MCObjectStreamer::mayHaveInstructions(MCSection &Sec) 
const {
 
 void MCObjectStreamer::emitInstruction(const MCInst &Inst,
                                        const MCSubtargetInfo &STI) {
-  if (LFIRewriter && LFIRewriter->isEnabled() && 
LFIRewriter->rewriteInst(Inst, *this, STI))
+  if (LFIRewriter && LFIRewriter->isEnabled() &&
+      LFIRewriter->rewriteInst(Inst, *this, STI))
     return;
 
   MCStreamer::emitInstruction(Inst, STI);
diff --git a/llvm/lib/MC/MCParser/LFIAsmParser.cpp 
b/llvm/lib/MC/MCParser/LFIAsmParser.cpp
index b54c955cd..4601052e0 100644
--- a/llvm/lib/MC/MCParser/LFIAsmParser.cpp
+++ b/llvm/lib/MC/MCParser/LFIAsmParser.cpp
@@ -31,8 +31,10 @@ public:
   void Initialize(MCAsmParser &Parser) override {
     // Call the base implementation.
     MCAsmParserExtension::Initialize(Parser);
-    
addDirectiveHandler<&LFIAsmParser::parseRewriteDisable>(".lfi_rewrite_disable");
-    
addDirectiveHandler<&LFIAsmParser::parseRewriteEnable>(".lfi_rewrite_enable");
+    addDirectiveHandler<&LFIAsmParser::parseRewriteDisable>(
+        ".lfi_rewrite_disable");
+    addDirectiveHandler<&LFIAsmParser::parseRewriteEnable>(
+        ".lfi_rewrite_enable");
   }
 
   /// ::= {.lfi_rewrite_disable}

``````````

</details>


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

Reply via email to