[PATCH] D83530: [llvm-symbolizer] Switch command line parsing from llvm::cl to OptTable
Zhihao Yuan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 22:03:40 PDT 2020
lichray added a comment.
LGTM.
================
Comment at: llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp:275
bool IsAddr2Line = sys::path::stem(argv[0]).contains("addr2line");
-
- if (IsAddr2Line) {
- ClDemangle.setInitialValue(false);
- ClPrintFunctions.setInitialValue(FunctionNameKind::None);
- ClPrintInlining.setInitialValue(false);
- ClUntagAddresses.setInitialValue(false);
- ClOutputStyle.setInitialValue(DIPrinter::OutputStyle::GNU);
- }
-
- llvm::sys::InitializeCOMRAII COM(llvm::sys::COMThreadingMode::MultiThreaded);
- cl::ParseCommandLineOptions(
- argc, argv, IsAddr2Line ? "llvm-addr2line\n" : "llvm-symbolizer\n",
- /*Errs=*/nullptr,
- IsAddr2Line ? "LLVM_ADDR2LINE_OPTS" : "LLVM_SYMBOLIZER_OPTS");
-
- // If both --demangle and --no-demangle are specified then pick the last one.
- if (ClNoDemangle.getPosition() > ClDemangle.getPosition())
- ClDemangle = !ClNoDemangle;
+ SmallVector<const char *, 0> NewArgv;
+ BumpPtrAllocator A;
----------------
You might have forgotten to remove this line.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83530/new/
https://reviews.llvm.org/D83530
More information about the llvm-commits
mailing list