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,c,hpp -- 
libunwind/src/Registers.hpp libunwind/src/UnwindCursor.hpp 
libunwind/src/UnwindLevel1.c libunwind/src/assembly.h libunwind/src/config.h 
libunwind/src/libunwind.cpp libunwind/src/libunwind_ext.h 
--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/libunwind/src/Registers.hpp b/libunwind/src/Registers.hpp
index 9b96e94a8..33c3ee8ee 100644
--- a/libunwind/src/Registers.hpp
+++ b/libunwind/src/Registers.hpp
@@ -1857,8 +1857,8 @@ public:
   void        setVectorRegister(int num, v128 value);
   static const char *getRegisterName(int num);
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
-  __attribute__((noinline, disable_tail_calls)) void
-  returnto(unsigned walkedFrames) {
+  __attribute__((noinline,
+                 disable_tail_calls)) void returnto(unsigned walkedFrames) {
     __libunwind_Registers_arm64_jumpto(this, walkedFrames);
   }
 #else
diff --git a/libunwind/src/UnwindCursor.hpp b/libunwind/src/UnwindCursor.hpp
index b4123b6bb..050fee86d 100644
--- a/libunwind/src/UnwindCursor.hpp
+++ b/libunwind/src/UnwindCursor.hpp
@@ -475,8 +475,7 @@ public:
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
   __attribute__((noinline, disable_tail_calls))
 #endif
-  virtual void
-  jumpto() {
+  virtual void jumpto() {
     _LIBUNWIND_ABORT("jumpto not implemented");
   }
   virtual bool isSignalFrame() {
@@ -980,8 +979,7 @@ public:
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
   __attribute__((noinline, disable_tail_calls))
 #endif
-  virtual void
-  jumpto();
+  virtual void jumpto();
   virtual bool        isSignalFrame();
   virtual bool        getFunctionName(char *buf, size_t len, unw_word_t *off);
   virtual void        setInfoBasedOnIPRegister(bool isReturnAddress = false);
@@ -1450,14 +1448,18 @@ template <typename A, typename R> void UnwindCursor<A, 
R>::jumpto() {
   jump, to rebalance the execution flow.
 
   ```
-      frame #0: libunwind.1.dylib`__libunwind_Registers_arm64_jumpto at 
UnwindRegistersRestore.S:646
-      frame #1: libunwind.1.dylib`libunwind::Registers_arm64::returnto at 
Registers.hpp:2291:3
-      frame #2: 
libunwind.1.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace, 
libunwind::Registers_arm64>::jumpto at UnwindCursor.hpp:1474:14
-      frame #3: libunwind.1.dylib`__unw_resume at libunwind.cpp:375:7
-      frame #4: libunwind.1.dylib`__unw_resume_with_frames_walked at 
libunwind.cpp:363:10
+      frame #0: libunwind.1.dylib`__libunwind_Registers_arm64_jumpto at
+  UnwindRegistersRestore.S:646 frame #1:
+  libunwind.1.dylib`libunwind::Registers_arm64::returnto at 
Registers.hpp:2291:3
+      frame #2:
+  libunwind.1.dylib`libunwind::UnwindCursor<libunwind::LocalAddressSpace,
+  libunwind::Registers_arm64>::jumpto at UnwindCursor.hpp:1474:14 frame #3:
+  libunwind.1.dylib`__unw_resume at libunwind.cpp:375:7 frame #4:
+  libunwind.1.dylib`__unw_resume_with_frames_walked at libunwind.cpp:363:10
       frame #5: libunwind.1.dylib`unwind_phase2 at UnwindLevel1.c:328:9
-      frame #6: libunwind.1.dylib`_Unwind_RaiseException at 
UnwindLevel1.c:480:10
-      frame #7: libc++abi.dylib`__cxa_throw at cxa_exception.cpp:295:5
+      frame #6: libunwind.1.dylib`_Unwind_RaiseException at
+  UnwindLevel1.c:480:10 frame #7: libc++abi.dylib`__cxa_throw at
+  cxa_exception.cpp:295:5
       ...
   ```
 
diff --git a/libunwind/src/assembly.h b/libunwind/src/assembly.h
index f387e33a7..e0f5f71b4 100644
--- a/libunwind/src/assembly.h
+++ b/libunwind/src/assembly.h
@@ -143,19 +143,20 @@
 #else
 #define EXPORT_SYMBOL(name)
 #endif
-#define WEAK_ALIAS(name, aliasname)                                            
\
-  .globl SYMBOL_NAME(aliasname) SEPARATOR                                      
\
-  EXPORT_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                              
\
-  SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
+#define WEAK_ALIAS(name, aliasname)                                          \
+    .globl SYMBOL_NAME(aliasname)                                              
\
+    SEPARATOR                                                                  
\
+    EXPORT_SYMBOL(SYMBOL_NAME(aliasname))                                      
\
+    SEPARATOR SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
 
 #define NO_EXEC_STACK_DIRECTIVE
 
 #elif defined(__ELF__)
 
 #if defined(__arm__)
-#define SYMBOL_IS_FUNC(name) .type name,%function
+#define SYMBOL_IS_FUNC(name) .type name, % function
 #else
-#define SYMBOL_IS_FUNC(name) .type name,@function
+#define SYMBOL_IS_FUNC(name) .type name, @function
 #endif
 #define HIDDEN_SYMBOL(name) .hidden name
 #if defined(_LIBUNWIND_HIDE_SYMBOLS)
@@ -166,35 +167,32 @@
 #define WEAK_SYMBOL(name) .weak name
 
 #if defined(__hexagon__)
-#define WEAK_ALIAS(name, aliasname)                                            
\
-  EXPORT_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                              
\
-  WEAK_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                                
\
-  .equiv SYMBOL_NAME(aliasname), SYMBOL_NAME(name)
+#define WEAK_ALIAS(name, aliasname)                                          \
+    EXPORT_SYMBOL(SYMBOL_NAME(aliasname))                                      
\
+    SEPARATOR WEAK_SYMBOL(SYMBOL_NAME(aliasname))                              
\
+        SEPARATOR.equiv SYMBOL_NAME(aliasname),                                
\
+        SYMBOL_NAME(name)
 #else
-#define WEAK_ALIAS(name, aliasname)                                            
\
-  EXPORT_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                              
\
-  WEAK_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                                
\
-  SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
+#define WEAK_ALIAS(name, aliasname)                                          \
+    EXPORT_SYMBOL(SYMBOL_NAME(aliasname))                                      
\
+    SEPARATOR WEAK_SYMBOL(SYMBOL_NAME(aliasname))                              
\
+        SEPARATOR SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
 #endif
 
-#if defined(__GNU__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
-    defined(__linux__)
-#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
+#if defined(__GNU__) || defined(__FreeBSD__) || defined(__Fuchsia__) ||      \
+      defined(__linux__)
+#define NO_EXEC_STACK_DIRECTIVE .section.note.GNU - stack, "", % progbits
 #else
 #define NO_EXEC_STACK_DIRECTIVE
 #endif
 
 #elif defined(_WIN32)
 
-#define SYMBOL_IS_FUNC(name)                                                   
\
-  .def name SEPARATOR                                                          
\
-    .scl 2 SEPARATOR                                                           
\
-    .type 32 SEPARATOR                                                         
\
-  .endef
-#define EXPORT_SYMBOL2(name)                                                   
\
-  .section .drectve,"yn" SEPARATOR                                             
\
-  .ascii "-export:", #name, "\0" SEPARATOR                                     
\
-  .text
+#define SYMBOL_IS_FUNC(name)                                                 \
+    .def name SEPARATOR.scl 2 SEPARATOR.type 32 SEPARATOR.endef
+#define EXPORT_SYMBOL2(name)                                                 \
+    .section.drectve, "yn" SEPARATOR.ascii "-export:", #name,                  
\
+        "\0" SEPARATOR.text
 #if defined(_LIBUNWIND_HIDE_SYMBOLS)
 #define EXPORT_SYMBOL(name)
 #else
@@ -203,20 +201,19 @@
 #define HIDDEN_SYMBOL(name)
 
 #if defined(__MINGW32__)
-#define WEAK_ALIAS(name, aliasname)                                            
\
-  .globl SYMBOL_NAME(aliasname) SEPARATOR                                      
\
-  EXPORT_SYMBOL(aliasname) SEPARATOR                                           
\
-  SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
+#define WEAK_ALIAS(name, aliasname)                                          \
+    .globl SYMBOL_NAME(aliasname)                                              
\
+    SEPARATOR                                                                  
\
+    EXPORT_SYMBOL(aliasname)                                                   
\
+    SEPARATOR SYMBOL_NAME(aliasname) = SYMBOL_NAME(name)
 #else
-#define WEAK_ALIAS3(name, aliasname)                                           
\
-  .section .drectve,"yn" SEPARATOR                                             
\
-  .ascii "-alternatename:", #aliasname, "=", #name, "\0" SEPARATOR             
\
-  .text
-#define WEAK_ALIAS2(name, aliasname)                                           
\
-  WEAK_ALIAS3(name, aliasname)
-#define WEAK_ALIAS(name, aliasname)                                            
\
-  EXPORT_SYMBOL(SYMBOL_NAME(aliasname)) SEPARATOR                              
\
-  WEAK_ALIAS2(SYMBOL_NAME(name), SYMBOL_NAME(aliasname))
+#define WEAK_ALIAS3(name, aliasname)                                         \
+    .section.drectve, "yn" SEPARATOR.ascii "-alternatename:", #aliasname, "=", 
\
+        #name, "\0" SEPARATOR.text
+#define WEAK_ALIAS2(name, aliasname) WEAK_ALIAS3(name, aliasname)
+#define WEAK_ALIAS(name, aliasname)                                          \
+    EXPORT_SYMBOL(SYMBOL_NAME(aliasname))                                      
\
+    SEPARATOR WEAK_ALIAS2(SYMBOL_NAME(name), SYMBOL_NAME(aliasname))
 #endif
 
 #define NO_EXEC_STACK_DIRECTIVE
diff --git a/libunwind/src/config.h b/libunwind/src/config.h
index b0bc28072..d8371c85f 100644
--- a/libunwind/src/config.h
+++ b/libunwind/src/config.h
@@ -28,9 +28,9 @@
     #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
     #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1
   #endif
-  #if (defined(__aarch64__) || defined(__arm64__) || defined(__arm64e__))
-    #define _LIBUNWIND_TRACE_RET_INJECT 1
-  #endif
+#if (defined(__aarch64__) || defined(__arm64__) || defined(__arm64e__))
+#define _LIBUNWIND_TRACE_RET_INJECT 1
+#endif
 #elif defined(_WIN32)
   #ifdef __SEH__
     #define _LIBUNWIND_SUPPORT_SEH_UNWIND 1
diff --git a/libunwind/src/libunwind_ext.h b/libunwind/src/libunwind_ext.h
index baca58a8c..b4f8f5727 100644
--- a/libunwind/src/libunwind_ext.h
+++ b/libunwind/src/libunwind_ext.h
@@ -33,8 +33,7 @@ extern int __unw_set_fpreg(unw_cursor_t *, unw_regnum_t, 
unw_fpreg_t);
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
 __attribute__((noinline, disable_tail_calls))
 #endif
-extern int
-__unw_resume_with_frames_walked(unw_cursor_t *, unsigned);
+extern int __unw_resume_with_frames_walked(unw_cursor_t *, unsigned);
 // Legacy function. Do not use.
 #ifdef _LIBUNWIND_TRACE_RET_INJECT
 __attribute__((noinline, disable_tail_calls))

``````````

</details>


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

Reply via email to