diff --git a/test/tools/llvm-symbolizer/output-style-inlined.test b/test/tools/llvm-symbolizer/output-style-inlined.test index daa9584a3f4..7e9f7e7ce18 100644 --- a/test/tools/llvm-symbolizer/output-style-inlined.test +++ b/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/test/tools/llvm-symbolizer/sym.test b/test/tools/llvm-symbolizer/sym.test index 20377ebf86c..73097b2c4b9 100644 --- a/test/tools/llvm-symbolizer/sym.test +++ b/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/tools/llvm-symbolizer/Opts.td b/tools/llvm-symbolizer/Opts.td index d83b796635b..66b38924023 100644 --- a/tools/llvm-symbolizer/Opts.td +++ b/tools/llvm-symbolizer/Opts.td @@ -58,3 +58,7 @@ def : Flag<["-"], "i">, Alias, HelpText<"Alias for --inlines">; def : F<"inlining", "Alias for --inlines">, Alias; def : Flag<["-"], "p">, Alias, HelpText<"Alias for --pretty-print">; def : Flag<["-"], "s">, Alias, HelpText<"Alias for --basenames">; + +// Compatibility aliases for old asan_symbolize.py and sanitizer binaries (before 2020-08). +def : Flag<["--"], "inlining=true">, Alias, HelpText<"Alias for --inlines">; +def : Flag<["--"], "inlining=false">, Alias, HelpText<"Alias for --no-inlines">;