1//===-- options.cpp - Command line options for llvm-debuginfo-analyzer----===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This handles the command line options for llvm-debuginfo-analyzer.
10//
11//===----------------------------------------------------------------------===//
12
13#include "Options.h"
14#include "llvm/DebugInfo/LogicalView/Core/LVOptions.h"
15#include "llvm/DebugInfo/LogicalView/Core/LVSort.h"
16#include "llvm/Support/CommandLine.h"
17
18using namespace llvm;
19using namespace llvm::logicalview;
20using namespace llvm::logicalview::cmdline;
21
22/// @}
23/// Command line options.
24/// @{
25
26OffsetParser::OffsetParser(cl::Option &O) : parser<unsigned long long>(O) {}
27OffsetParser::~OffsetParser() = default;
28
29bool OffsetParser::parse(cl::Option &O, StringRef ArgName, StringRef Arg,
30 unsigned long long &Val) {
31 char *End;
32 std::string Argument(Arg);
33 Val = strtoull(nptr: Argument.c_str(), endptr: &End, base: 0);
34 if (*End)
35 // Print an error message if unrecognized character.
36 return O.error(Message: "'" + Arg + "' unrecognized character.");
37 return false;
38}
39
40LVOptions cmdline::ReaderOptions;
41
42//===----------------------------------------------------------------------===//
43// Specific options
44//===----------------------------------------------------------------------===//
45cl::list<std::string>
46 cmdline::InputFilenames(cl::desc("<input object files or .dSYM bundles>"),
47 cl::Positional);
48
49//===----------------------------------------------------------------------===//
50// '--attribute' options
51//===----------------------------------------------------------------------===//
52cl::OptionCategory
53 cmdline::AttributeCategory("Attribute Options",
54 "These control extra attributes that are "
55 "added when the element is printed.");
56
57// --attribute=<value>[,<value>,...]
58cl::list<LVAttributeKind> cmdline::AttributeOptions(
59 "attribute", cl::cat(AttributeCategory), cl::desc("Element attributes."),
60 cl::Hidden, cl::CommaSeparated,
61 values(clEnumValN(LVAttributeKind::All, "all", "Include all attributes."),
62 clEnumValN(LVAttributeKind::Argument, "argument",
63 "Template parameters replaced by its arguments."),
64 clEnumValN(LVAttributeKind::Base, "base",
65 "Base types (int, bool, etc.)."),
66 clEnumValN(LVAttributeKind::Coverage, "coverage",
67 "Symbol location coverage."),
68 clEnumValN(LVAttributeKind::Directories, "directories",
69 "Directories referenced in the debug information."),
70 clEnumValN(LVAttributeKind::Discarded, "discarded",
71 "Discarded elements by the linker."),
72 clEnumValN(LVAttributeKind::Discriminator, "discriminator",
73 "Discriminators for inlined function instances."),
74 clEnumValN(LVAttributeKind::Encoded, "encoded",
75 "Template arguments encoded in the template name."),
76 clEnumValN(LVAttributeKind::Extended, "extended",
77 "Advanced attributes alias."),
78 clEnumValN(LVAttributeKind::Filename, "filename",
79 "Filename where the element is defined."),
80 clEnumValN(LVAttributeKind::Files, "files",
81 "Files referenced in the debug information."),
82 clEnumValN(LVAttributeKind::Format, "format",
83 "Object file format name."),
84 clEnumValN(LVAttributeKind::Gaps, "gaps",
85 "Missing debug location (gaps)."),
86 clEnumValN(LVAttributeKind::Generated, "generated",
87 "Compiler generated elements."),
88 clEnumValN(LVAttributeKind::Global, "global",
89 "Element referenced across Compile Units."),
90 clEnumValN(LVAttributeKind::Inserted, "inserted",
91 "Generated inlined abstract references."),
92 clEnumValN(LVAttributeKind::Language, "language",
93 "Source language name."),
94 clEnumValN(LVAttributeKind::Level, "level",
95 "Lexical scope level (File=0, Compile Unit=1)."),
96 clEnumValN(LVAttributeKind::Linkage, "linkage", "Linkage name."),
97 clEnumValN(LVAttributeKind::Local, "local",
98 "Element referenced only in the Compile Unit."),
99 clEnumValN(LVAttributeKind::Location, "location",
100 "Element debug location."),
101 clEnumValN(LVAttributeKind::Offset, "offset",
102 "Debug information offset."),
103 clEnumValN(LVAttributeKind::Pathname, "pathname",
104 "Pathname where the element is defined."),
105 clEnumValN(LVAttributeKind::Producer, "producer",
106 "Toolchain identification name."),
107 clEnumValN(LVAttributeKind::Publics, "publics",
108 "Function names that are public."),
109 clEnumValN(LVAttributeKind::Qualified, "qualified",
110 "The element type include parents in its name."),
111 clEnumValN(LVAttributeKind::Qualifier, "qualifier",
112 "Line qualifiers (Newstatement, BasicBlock, etc.)."),
113 clEnumValN(LVAttributeKind::Range, "range",
114 "Debug location ranges."),
115 clEnumValN(LVAttributeKind::Reference, "reference",
116 "Element declaration and definition references."),
117 clEnumValN(LVAttributeKind::Register, "register",
118 "Processor register names."),
119 clEnumValN(LVAttributeKind::Size, "size", "Type sizes."),
120 clEnumValN(LVAttributeKind::Standard, "standard",
121 "Basic attributes alias."),
122 clEnumValN(LVAttributeKind::Subrange, "subrange",
123 "Subrange encoding information for arrays."),
124 clEnumValN(LVAttributeKind::System, "system",
125 "Display PDB's MS system elements."),
126 clEnumValN(LVAttributeKind::Typename, "typename",
127 "Include Parameters in templates."),
128 clEnumValN(LVAttributeKind::Underlying, "underlying",
129 "Underlying type for type definitions."),
130 clEnumValN(LVAttributeKind::Zero, "zero", "Zero line numbers.")));
131
132//===----------------------------------------------------------------------===//
133// '--compare' options
134//===----------------------------------------------------------------------===//
135cl::OptionCategory
136 cmdline::CompareCategory("Compare Options",
137 "These control the view comparison.");
138
139// --compare-context
140static cl::opt<bool, true>
141 CompareContext("compare-context", cl::cat(CompareCategory),
142 cl::desc("Add the view as compare context."), cl::Hidden,
143 cl::location(L&: ReaderOptions.Compare.Context));
144
145// --compare=<value>[,<value>,...]
146cl::list<LVCompareKind> cmdline::CompareElements(
147 "compare", cl::cat(CompareCategory), cl::desc("Elements to compare."),
148 cl::Hidden, cl::CommaSeparated,
149 values(clEnumValN(LVCompareKind::All, "all", "Compare all elements."),
150 clEnumValN(LVCompareKind::Lines, "lines", "Lines."),
151 clEnumValN(LVCompareKind::Scopes, "scopes", "Scopes."),
152 clEnumValN(LVCompareKind::Symbols, "symbols", "Symbols."),
153 clEnumValN(LVCompareKind::Types, "types", "Types.")));
154
155//===----------------------------------------------------------------------===//
156// '--output' options
157//===----------------------------------------------------------------------===//
158cl::OptionCategory
159 cmdline::OutputCategory("Output Options",
160 "These control the output generated.");
161
162// --output-file=<filename>
163cl::opt<std::string>
164 cmdline::OutputFilename("output-file", cl::cat(OutputCategory),
165 cl::desc("Redirect output to the specified file."),
166 cl::Hidden, cl::value_desc("filename"),
167 cl::init(Val: "-"));
168
169// --output-folder=<path>
170static cl::opt<std::string, true>
171 OutputFolder("output-folder", cl::cat(OutputCategory),
172 cl::desc("Folder name for view splitting."),
173 cl::value_desc("pathname"), cl::Hidden,
174 cl::location(L&: ReaderOptions.Output.Folder));
175
176// --output-level=<level>
177static cl::opt<unsigned, true>
178 OutputLevel("output-level", cl::cat(OutputCategory),
179 cl::desc("Only print to a depth of N elements."),
180 cl::value_desc("N"), cl::Hidden,
181 cl::location(L&: ReaderOptions.Output.Level), cl::init(Val: -1U));
182
183// --ouput=<value>[,<value>,...]
184cl::list<LVOutputKind> cmdline::OutputOptions(
185 "output", cl::cat(OutputCategory), cl::desc("Outputs for view."),
186 cl::Hidden, cl::CommaSeparated,
187 values(clEnumValN(LVOutputKind::All, "all", "All outputs."),
188 clEnumValN(LVOutputKind::Split, "split",
189 "Split the output by Compile Units."),
190 clEnumValN(LVOutputKind::Text, "text",
191 "Use a free form text output."),
192 clEnumValN(LVOutputKind::Json, "json",
193 "Use JSON as the output format.")));
194
195// --output-sort
196static cl::opt<LVSortMode, true> OutputSort(
197 "output-sort", cl::cat(OutputCategory),
198 cl::desc("Primary key when ordering logical view (default: line)."),
199 cl::Hidden,
200 values(clEnumValN(LVSortMode::None, "none",
201 "Unsorted output (i.e. as read from input)."),
202 clEnumValN(LVSortMode::ID, "id", "Sort by unique element ID."),
203 clEnumValN(LVSortMode::Kind, "kind", "Sort by element kind."),
204 clEnumValN(LVSortMode::Line, "line", "Sort by element line number."),
205 clEnumValN(LVSortMode::Name, "name", "Sort by element name."),
206 clEnumValN(LVSortMode::Offset, "offset", "Sort by element offset.")),
207 cl::location(L&: ReaderOptions.Output.SortMode), cl::init(Val: LVSortMode::Line));
208
209//===----------------------------------------------------------------------===//
210// '--print' options
211//===----------------------------------------------------------------------===//
212cl::OptionCategory
213 cmdline::PrintCategory("Print Options",
214 "These control which elements are printed.");
215
216// --print=<value>[,<value>,...]
217cl::list<LVPrintKind> cmdline::PrintOptions(
218 "print", cl::cat(PrintCategory), cl::desc("Element to print."),
219 cl::CommaSeparated,
220 values(clEnumValN(LVPrintKind::All, "all", "All elements."),
221 clEnumValN(LVPrintKind::Elements, "elements",
222 "Instructions, lines, scopes, symbols and types."),
223 clEnumValN(LVPrintKind::Instructions, "instructions",
224 "Assembler instructions."),
225 clEnumValN(LVPrintKind::Lines, "lines",
226 "Lines referenced in the debug information."),
227 clEnumValN(LVPrintKind::Scopes, "scopes",
228 "A lexical block (Function, Class, etc.)."),
229 clEnumValN(LVPrintKind::Sizes, "sizes",
230 "Scope contributions to the debug information."),
231 clEnumValN(LVPrintKind::Summary, "summary",
232 "Summary of elements missing/added/matched/printed."),
233 clEnumValN(LVPrintKind::Symbols, "symbols",
234 "Symbols (Variable, Members, etc.)."),
235 clEnumValN(LVPrintKind::Types, "types",
236 "Types (Pointer, Reference, etc.)."),
237 clEnumValN(LVPrintKind::Warnings, "warnings",
238 "Warnings detected.")));
239
240//===----------------------------------------------------------------------===//
241// '--report' options
242//===----------------------------------------------------------------------===//
243cl::OptionCategory
244 cmdline::ReportCategory("Report Options",
245 "These control how the elements are printed.");
246
247// --report=<value>[,<value>,...]
248cl::list<LVReportKind> cmdline::ReportOptions(
249 "report", cl::cat(ReportCategory),
250 cl::desc("Reports layout used for print, compare and select."), cl::Hidden,
251 cl::CommaSeparated,
252 values(clEnumValN(LVReportKind::All, "all", "Generate all reports."),
253 clEnumValN(LVReportKind::Children, "children",
254 "Selected elements are displayed in a tree view "
255 "(Include children)"),
256 clEnumValN(LVReportKind::List, "list",
257 "Selected elements are displayed in a tabular format."),
258 clEnumValN(LVReportKind::Parents, "parents",
259 "Selected elements are displayed in a tree view. "
260 "(Include parents)"),
261 clEnumValN(LVReportKind::View, "view",
262 "Selected elements are displayed in a tree view "
263 "(Include parents and children.")));
264
265//===----------------------------------------------------------------------===//
266// '--select' options
267//===----------------------------------------------------------------------===//
268cl::OptionCategory
269 cmdline::SelectCategory("Select Options",
270 "These control which elements are selected.");
271
272// --select-nocase
273static cl::opt<bool, true>
274 SelectIgnoreCase("select-nocase", cl::cat(SelectCategory),
275 cl::desc("Ignore case distinctions when searching."),
276 cl::Hidden, cl::location(L&: ReaderOptions.Select.IgnoreCase));
277
278// --select-regex
279static cl::opt<bool, true> SelectUseRegex(
280 "select-regex", cl::cat(SelectCategory),
281 cl::desc("Treat any <pattern> strings as regular expressions when "
282 "selecting instead of just as an exact string match."),
283 cl::Hidden, cl::location(L&: ReaderOptions.Select.UseRegex));
284
285// --select=<pattern>
286cl::list<std::string> cmdline::SelectPatterns(
287 "select", cl::cat(SelectCategory),
288 cl::desc("Search elements matching the given pattern."), cl::Hidden,
289 cl::value_desc("pattern"), cl::CommaSeparated);
290
291// --select-offsets=<value>[,<value>,...]
292OffsetOptionList cmdline::SelectOffsets("select-offsets",
293 cl::cat(SelectCategory),
294 cl::desc("Offset element to print."),
295 cl::Hidden, cl::value_desc("offset"),
296 cl::CommaSeparated);
297
298// --select-elements=<value>[,<value>,...]
299cl::list<LVElementKind> cmdline::SelectElements(
300 "select-elements", cl::cat(SelectCategory),
301 cl::desc("Conditions to use when printing elements."), cl::Hidden,
302 cl::CommaSeparated,
303 values(clEnumValN(LVElementKind::Discarded, "Discarded",
304 "Discarded elements by the linker."),
305 clEnumValN(LVElementKind::Global, "Global",
306 "Element referenced across Compile Units."),
307 clEnumValN(LVElementKind::Optimized, "Optimized",
308 "Generated inlined abstract references.")));
309
310// --select-lines=<value>[,<value>,...]
311cl::list<LVLineKind> cmdline::SelectLines(
312 "select-lines", cl::cat(SelectCategory),
313 cl::desc("Line kind to use when printing lines."), cl::Hidden,
314 cl::CommaSeparated,
315 values(
316 clEnumValN(LVLineKind::IsAlwaysStepInto, "AlwaysStepInto",
317 "Always Step Into."),
318 clEnumValN(LVLineKind::IsBasicBlock, "BasicBlock", "Basic block."),
319 clEnumValN(LVLineKind::IsDiscriminator, "Discriminator",
320 "Discriminator."),
321 clEnumValN(LVLineKind::IsEndSequence, "EndSequence", "End sequence."),
322 clEnumValN(LVLineKind::IsEpilogueBegin, "EpilogueBegin.",
323 "Epilogue begin."),
324 clEnumValN(LVLineKind::IsLineDebug, "LineDebug", "Debug line."),
325 clEnumValN(LVLineKind::IsLineAssembler, "LineAssembler",
326 "Assembler line."),
327 clEnumValN(LVLineKind::IsNeverStepInto, "NeverStepInto",
328 "Never Step Into."),
329 clEnumValN(LVLineKind::IsNewStatement, "NewStatement",
330 "New statement."),
331 clEnumValN(LVLineKind::IsPrologueEnd, "PrologueEnd", "Prologue end.")));
332
333// --select-scopes=<value>[,<value>,...]
334cl::list<LVScopeKind> cmdline::SelectScopes(
335 "select-scopes", cl::cat(SelectCategory),
336 cl::desc("Scope kind to use when printing scopes."), cl::Hidden,
337 cl::CommaSeparated,
338 values(
339 clEnumValN(LVScopeKind::IsAggregate, "Aggregate",
340 "Class, Structure or Union."),
341 clEnumValN(LVScopeKind::IsArray, "Array", "Array."),
342 clEnumValN(LVScopeKind::IsBlock, "Block", "Lexical block."),
343 clEnumValN(LVScopeKind::IsCallSite, "CallSite", "Call site block."),
344 clEnumValN(LVScopeKind::IsCatchBlock, "CatchBlock",
345 "Exception catch block."),
346 clEnumValN(LVScopeKind::IsClass, "Class", "Class."),
347 clEnumValN(LVScopeKind::IsCompileUnit, "CompileUnit", "Compile unit."),
348 clEnumValN(LVScopeKind::IsEntryPoint, "EntryPoint",
349 "Function entry point."),
350 clEnumValN(LVScopeKind::IsEnumeration, "Enumeration", "Enumeration."),
351 clEnumValN(LVScopeKind::IsFunction, "Function", "Function."),
352 clEnumValN(LVScopeKind::IsFunctionType, "FunctionType",
353 "Function type."),
354 clEnumValN(LVScopeKind::IsInlinedFunction, "InlinedFunction",
355 "Inlined function."),
356 clEnumValN(LVScopeKind::IsLabel, "Label", "Label."),
357 clEnumValN(LVScopeKind::IsLexicalBlock, "LexicalBlock",
358 "Lexical block."),
359 clEnumValN(LVScopeKind::IsModule, "Module", "Module."),
360 clEnumValN(LVScopeKind::IsNamespace, "Namespace", "Namespace."),
361 clEnumValN(LVScopeKind::IsRoot, "Root", "Root."),
362 clEnumValN(LVScopeKind::IsStructure, "Structure", "Structure."),
363 clEnumValN(LVScopeKind::IsSubprogram, "Subprogram", "Subprogram."),
364 clEnumValN(LVScopeKind::IsTemplate, "Template", "Template."),
365 clEnumValN(LVScopeKind::IsTemplateAlias, "TemplateAlias",
366 "Template alias."),
367 clEnumValN(LVScopeKind::IsTemplatePack, "TemplatePack",
368 "Template pack."),
369 clEnumValN(LVScopeKind::IsTryBlock, "TryBlock", "Exception try block."),
370 clEnumValN(LVScopeKind::IsUnion, "Union", "Union.")));
371
372// --select-symbols=<value>[,<value>,...]
373cl::list<LVSymbolKind> cmdline::SelectSymbols(
374 "select-symbols", cl::cat(SelectCategory),
375 cl::desc("Symbol kind to use when printing symbols."), cl::Hidden,
376 cl::CommaSeparated,
377 values(clEnumValN(LVSymbolKind::IsCallSiteParameter, "CallSiteParameter",
378 "Call site parameter."),
379 clEnumValN(LVSymbolKind::IsConstant, "Constant", "Constant."),
380 clEnumValN(LVSymbolKind::IsInheritance, "Inheritance",
381 "Inheritance."),
382 clEnumValN(LVSymbolKind::IsMember, "Member", "Member."),
383 clEnumValN(LVSymbolKind::IsParameter, "Parameter", "Parameter."),
384 clEnumValN(LVSymbolKind::IsUnspecified, "Unspecified",
385 "Unspecified parameter."),
386 clEnumValN(LVSymbolKind::IsVariable, "Variable", "Variable.")));
387
388// --select-types=<value>[,<value>,...]
389cl::list<LVTypeKind> cmdline::SelectTypes(
390 "select-types", cl::cat(SelectCategory),
391 cl::desc("Type kind to use when printing types."), cl::Hidden,
392 cl::CommaSeparated,
393 values(
394 clEnumValN(LVTypeKind::IsBase, "Base", "Base Type (int, bool, etc.)."),
395 clEnumValN(LVTypeKind::IsConst, "Const", "Constant specifier."),
396 clEnumValN(LVTypeKind::IsEnumerator, "Enumerator", "Enumerator."),
397 clEnumValN(LVTypeKind::IsImport, "Import", "Import."),
398 clEnumValN(LVTypeKind::IsImportDeclaration, "ImportDeclaration",
399 "Import declaration."),
400 clEnumValN(LVTypeKind::IsImportModule, "ImportModule",
401 "Import module."),
402 clEnumValN(LVTypeKind::IsPointer, "Pointer", "Pointer."),
403 clEnumValN(LVTypeKind::IsPointerMember, "PointerMember",
404 "Pointer to member."),
405 clEnumValN(LVTypeKind::IsReference, "Reference", "Reference type."),
406 clEnumValN(LVTypeKind::IsRestrict, "Restrict", "Restrict specifier."),
407 clEnumValN(LVTypeKind::IsRvalueReference, "RvalueReference",
408 "Rvalue reference."),
409 clEnumValN(LVTypeKind::IsSubrange, "Subrange", "Array subrange."),
410 clEnumValN(LVTypeKind::IsTemplateParam, "TemplateParam",
411 "Template Parameter."),
412 clEnumValN(LVTypeKind::IsTemplateTemplateParam, "TemplateTemplateParam",
413 "Template template parameter."),
414 clEnumValN(LVTypeKind::IsTemplateTypeParam, "TemplateTypeParam",
415 "Template type parameter."),
416 clEnumValN(LVTypeKind::IsTemplateValueParam, "TemplateValueParam",
417 "Template value parameter."),
418 clEnumValN(LVTypeKind::IsTypedef, "Typedef", "Type definition."),
419 clEnumValN(LVTypeKind::IsUnspecified, "Unspecified",
420 "Unspecified type."),
421 clEnumValN(LVTypeKind::IsVolatile, "Volatile", "Volatile specifier.")));
422
423//===----------------------------------------------------------------------===//
424// '--warning' options
425//===----------------------------------------------------------------------===//
426cl::OptionCategory
427 cmdline::WarningCategory("Warning Options",
428 "These control the generated warnings.");
429
430// --warning=<value>[,<value>,...]
431cl::list<LVWarningKind> cmdline::WarningOptions(
432 "warning", cl::cat(WarningCategory), cl::desc("Warnings to generate."),
433 cl::Hidden, cl::CommaSeparated,
434 values(
435 clEnumValN(LVWarningKind::All, "all", "All warnings."),
436 clEnumValN(LVWarningKind::Coverages, "coverages",
437 "Invalid symbol coverages values."),
438 clEnumValN(LVWarningKind::Lines, "lines", "Debug lines that are zero."),
439 clEnumValN(LVWarningKind::Locations, "locations",
440 "Invalid symbol locations."),
441 clEnumValN(LVWarningKind::Ranges, "ranges", "Invalid code ranges.")));
442
443//===----------------------------------------------------------------------===//
444// '--internal' options
445//===----------------------------------------------------------------------===//
446cl::OptionCategory
447 cmdline::InternalCategory("Internal Options",
448 "Internal traces and extra debugging code.");
449
450// --internal=<value>[,<value>,...]
451cl::list<LVInternalKind> cmdline::InternalOptions(
452 "internal", cl::cat(InternalCategory), cl::desc("Traces to enable."),
453 cl::Hidden, cl::CommaSeparated,
454 values(
455 clEnumValN(LVInternalKind::All, "all", "Enable all traces."),
456 clEnumValN(LVInternalKind::Cmdline, "cmdline", "Print command line."),
457 clEnumValN(LVInternalKind::ID, "id", "Print unique element ID"),
458 clEnumValN(LVInternalKind::Integrity, "integrity",
459 "Check elements integrity."),
460 clEnumValN(LVInternalKind::None, "none", "Ignore element line number."),
461 clEnumValN(LVInternalKind::Tag, "tag", "Debug information tags.")));
462
463/// @}
464
465// Copy local options into a globally accessible data structure.
466void llvm::logicalview::cmdline::propagateOptions() {
467 // Traverse list of options and update the given set (Using case and Regex).
468 auto UpdatePattern = [&](auto &List, auto &Set, bool IgnoreCase,
469 bool UseRegex) {
470 if (!List.empty())
471 for (std::string &Pattern : List)
472 Set.insert((IgnoreCase && !UseRegex) ? StringRef(Pattern).lower()
473 : Pattern);
474 };
475
476 // Handle --select.
477 UpdatePattern(SelectPatterns, ReaderOptions.Select.Generic,
478 ReaderOptions.Select.IgnoreCase, ReaderOptions.Select.UseRegex);
479
480 // Traverse list of options and update the given set.
481 auto UpdateSet = [&](auto &List, auto &Set) {
482 std::copy(List.begin(), List.end(), std::inserter(Set, Set.begin()));
483 };
484
485 // Handle options sets.
486 UpdateSet(AttributeOptions, ReaderOptions.Attribute.Kinds);
487 UpdateSet(PrintOptions, ReaderOptions.Print.Kinds);
488 UpdateSet(OutputOptions, ReaderOptions.Output.Kinds);
489 UpdateSet(ReportOptions, ReaderOptions.Report.Kinds);
490 UpdateSet(WarningOptions, ReaderOptions.Warning.Kinds);
491 UpdateSet(InternalOptions, ReaderOptions.Internal.Kinds);
492
493 UpdateSet(SelectElements, ReaderOptions.Select.Elements);
494 UpdateSet(SelectLines, ReaderOptions.Select.Lines);
495 UpdateSet(SelectScopes, ReaderOptions.Select.Scopes);
496 UpdateSet(SelectSymbols, ReaderOptions.Select.Symbols);
497 UpdateSet(SelectTypes, ReaderOptions.Select.Types);
498 UpdateSet(SelectOffsets, ReaderOptions.Select.Offsets);
499 UpdateSet(CompareElements, ReaderOptions.Compare.Elements);
500
501 // Resolve any options dependencies (ie. --print=all should set other
502 // print options, etc.).
503 ReaderOptions.resolveDependencies();
504}
505