[llvm] [llvm-objcopy] Add llvm-objcopy option --set-visibility-sym (PR #80872)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 09:34:20 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 388548359f5049b88a9738d8a9e67691503fbdef f6b659b986d51f12e283174c6a2cc90c06549ee7 -- llvm/include/llvm/ObjCopy/ELF/ELFConfig.h llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
index a6f8c8cf7b..70b8cc4938 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+++ b/llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
@@ -989,9 +989,8 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
     if (!Type)
       return Type.takeError();
     ELFConfig.SetVisibilityType = *Type;
-    if (Error E =
-            ELFConfig.SymbolsToSetVisibility.addMatcher(NameOrPattern::create(
-                Sym, SymbolMatchStyle, ErrorCallback)))
+    if (Error E = ELFConfig.SymbolsToSetVisibility.addMatcher(
+            NameOrPattern::create(Sym, SymbolMatchStyle, ErrorCallback)))
       return std::move(E);
   }
   for (auto *Arg : InputArgs.filtered(OBJCOPY_set_visibility_syms)) {
@@ -1007,8 +1006,7 @@ objcopy::parseObjcopyOptions(ArrayRef<const char *> RawArgsArr,
       return Type.takeError();
     ELFConfig.SetVisibilityType = *Type;
     if (Error E = addSymbolsFromFile(ELFConfig.SymbolsToSetVisibility, DC.Alloc,
-                                     File, SymbolMatchStyle,
-                                     ErrorCallback))
+                                     File, SymbolMatchStyle, ErrorCallback))
       return std::move(E);
   }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/80872


More information about the llvm-commits mailing list