[PATCH] D47674: [llvm-strip] Add missing aliases for --strip-debug

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 11:59:58 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL333940: [llvm-strip] Add missing aliases for --strip-debug (authored by alexshap, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47674?vs=149606&id=149821#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D47674

Files:
  llvm/trunk/test/tools/llvm-objcopy/strip-debug.test
  llvm/trunk/tools/llvm-objcopy/StripOpts.td


Index: llvm/trunk/test/tools/llvm-objcopy/strip-debug.test
===================================================================
--- llvm/trunk/test/tools/llvm-objcopy/strip-debug.test
+++ llvm/trunk/test/tools/llvm-objcopy/strip-debug.test
@@ -1,15 +1,26 @@
 # RUN: yaml2obj %s > %t
+# RUN: cp %t %t3
 # RUN: llvm-objcopy -strip-debug %t %t2
 # RUN: llvm-readobj -file-headers -sections -symbols %t2 | FileCheck %s
 
-# We run yaml2obj again rather than copy %t to avoid interfering 
-# with llvm-objcopy's test (which potentially could have corrupted/updated the binary).
+# Verify that the previous run of llvm-objcopy has not modified the input.
+# RUN: cmp %t %t3
 
-# RUN: yaml2obj %s > %t3
 # RUN: llvm-strip -strip-debug %t3
-# RUN: llvm-readobj -file-headers -sections -symbols %t3 | FileCheck %s
 # RUN: cmp %t2 %t3
 
+# RUN: cp %t %t4
+# RUN: llvm-strip -d %t4
+# RUN: cmp %t2 %t4
+
+# RUN: cp %t %t5
+# RUN: llvm-strip -g %t5
+# RUN: cmp %t2 %t5
+
+# RUN: cp %t %t6
+# RUN: llvm-strip -S %t6
+# RUN: cmp %t2 %t6
+
 !ELF
 FileHeader:
   Class:           ELFCLASS64
Index: llvm/trunk/tools/llvm-objcopy/StripOpts.td
===================================================================
--- llvm/trunk/tools/llvm-objcopy/StripOpts.td
+++ llvm/trunk/tools/llvm-objcopy/StripOpts.td
@@ -14,6 +14,15 @@
 def strip_debug : Flag<["-", "--"], "strip-debug">,
                   HelpText<"Remove debugging symbols only">;
 
+def d : Flag<["-"], "d">,
+        Alias<strip_debug>;
+
+def g : Flag<["-"], "g">,
+        Alias<strip_debug>;
+
+def S : Flag<["-"], "S">,
+        Alias<strip_debug>;
+
 defm remove_section : Eq<"remove-section">,
                       MetaVarName<"section">,
                       HelpText<"Remove <section>">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47674.149821.patch
Type: text/x-patch
Size: 1741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180604/1485cb09/attachment.bin>


More information about the llvm-commits mailing list