[llvm] 12cb400 - [llvm-symbolizer] Add compatibility aliases for --inlining={true,false}
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 11:32:13 PDT 2020
Author: Fangrui Song
Date: 2020-08-04T11:32:05-07:00
New Revision: 12cb400fd25863154c6d4d26427642cac0e52da1
URL: https://github.com/llvm/llvm-project/commit/12cb400fd25863154c6d4d26427642cac0e52da1
DIFF: https://github.com/llvm/llvm-project/commit/12cb400fd25863154c6d4d26427642cac0e52da1.diff
LOG: [llvm-symbolizer] Add compatibility aliases for --inlining={true,false}
D83530 removed --inlining={true,false} which were used by old asan_symbolize.py script.
Add compatibility aliases so that old asan_symbolize.py and sanitizer
binaries can work with new llvm-symbolizer.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D85228
Added:
Modified:
llvm/test/tools/llvm-symbolizer/output-style-inlined.test
llvm/test/tools/llvm-symbolizer/sym.test
llvm/tools/llvm-symbolizer/Opts.td
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-symbolizer/output-style-inlined.test b/llvm/test/tools/llvm-symbolizer/output-style-inlined.test
index daa9584a3f48..7e9f7e7ce180 100644
--- a/llvm/test/tools/llvm-symbolizer/output-style-inlined.test
+++ b/llvm/test/tools/llvm-symbolizer/output-style-inlined.test
@@ -6,6 +6,10 @@ the option is not specified.
RUN: llvm-symbolizer --no-inlines -e %p/Inputs/addr.exe 0x40054d \
RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
+## Before 2020-08-04, asan_symbolize.py passed --inlining=false if 'symbolize_inline_frames'
+## is set to false. Support this compatibility alias for a while.
+RUN: llvm-symbolizer --inlining=false -e %p/Inputs/addr.exe 0x40054d \
+RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
RUN: llvm-symbolizer --output-style=LLVM --no-inlines -e %p/Inputs/addr.exe 0x40054d \
RUN: | FileCheck %s --check-prefix=LLVM --implicit-check-not=inctwo
diff --git a/llvm/test/tools/llvm-symbolizer/sym.test b/llvm/test/tools/llvm-symbolizer/sym.test
index 20377ebf86c4..73097b2c4b9b 100644
--- a/llvm/test/tools/llvm-symbolizer/sym.test
+++ b/llvm/test/tools/llvm-symbolizer/sym.test
@@ -26,6 +26,10 @@ RUN: llvm-symbolizer -inlines -print-address -pretty-print -obj=%p/Inputs/addr.e
RUN: llvm-symbolizer -inlines -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
RUN: llvm-symbolizer -i -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
RUN: llvm-symbolizer -i -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+## Before 2020-08-04, asan_symbolize.py passed --inlining=true.
+## Support this compatibility alias for a while.
+RUN: llvm-symbolizer --inlining=true --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+
RUN: echo "0x1" > %t.input
RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
diff --git a/llvm/tools/llvm-symbolizer/Opts.td b/llvm/tools/llvm-symbolizer/Opts.td
index d83b796635b8..66b38924023f 100644
--- a/llvm/tools/llvm-symbolizer/Opts.td
+++ b/llvm/tools/llvm-symbolizer/Opts.td
@@ -58,3 +58,7 @@ def : Flag<["-"], "i">, Alias<inlines>, HelpText<"Alias for --inlines">;
def : F<"inlining", "Alias for --inlines">, Alias<inlines>;
def : Flag<["-"], "p">, Alias<pretty_print>, HelpText<"Alias for --pretty-print">;
def : Flag<["-"], "s">, Alias<basenames>, HelpText<"Alias for --basenames">;
+
+// Compatibility aliases for old asan_symbolize.py and sanitizer binaries (before 2020-08).
+def : Flag<["--"], "inlining=true">, Alias<inlines>, HelpText<"Alias for --inlines">;
+def : Flag<["--"], "inlining=false">, Alias<no_inlines>, HelpText<"Alias for --no-inlines">;
More information about the llvm-commits
mailing list