Path: blob/main/contrib/llvm-project/llvm/tools/llvm-debuginfo-analyzer/Options.h
35230 views
//===-- Options.h -----------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file defines command line options used by llvm-debuginfo-analyzer.9//10//===----------------------------------------------------------------------===//1112#ifndef OPTIONS_H13#define OPTIONS_H1415#include "llvm/DebugInfo/LogicalView/Core/LVLine.h"16#include "llvm/DebugInfo/LogicalView/Core/LVOptions.h"17#include "llvm/DebugInfo/LogicalView/Core/LVScope.h"18#include "llvm/DebugInfo/LogicalView/Core/LVSymbol.h"19#include "llvm/DebugInfo/LogicalView/Core/LVType.h"20#include "llvm/Support/CommandLine.h"2122namespace llvm {23namespace logicalview {24namespace cmdline {2526class OffsetParser final : public llvm::cl::parser<unsigned long long> {27public:28OffsetParser(llvm::cl::Option &O);29~OffsetParser() override;3031// Parse an argument representing an offset. Return true on error.32// If the prefix is 0, the base is octal, if the prefix is 0x or 0X, the33// base is hexadecimal, otherwise the base is decimal.34bool parse(llvm::cl::Option &O, StringRef ArgName, StringRef ArgValue,35unsigned long long &Val);36};3738typedef llvm::cl::list<unsigned long long, bool, OffsetParser> OffsetOptionList;3940extern llvm::cl::OptionCategory AttributeCategory;41extern llvm::cl::OptionCategory CompareCategory;42extern llvm::cl::OptionCategory OutputCategory;43extern llvm::cl::OptionCategory PrintCategory;44extern llvm::cl::OptionCategory ReportCategory;45extern llvm::cl::OptionCategory SelectCategory;46extern llvm::cl::OptionCategory WarningCategory;47extern llvm::cl::OptionCategory InternalCategory;4849extern llvm::cl::list<std::string> InputFilenames;50extern llvm::cl::opt<std::string> OutputFilename;5152extern llvm::cl::list<std::string> SelectPatterns;5354extern llvm::cl::list<LVElementKind> SelectElements;55extern llvm::cl::list<LVLineKind> SelectLines;56extern llvm::cl::list<LVScopeKind> SelectScopes;57extern llvm::cl::list<LVSymbolKind> SelectSymbols;58extern llvm::cl::list<LVTypeKind> SelectTypes;59extern OffsetOptionList SelectOffsets;6061extern llvm::cl::list<LVAttributeKind> AttributeOptions;62extern llvm::cl::list<LVOutputKind> OutputOptions;63extern llvm::cl::list<LVPrintKind> PrintOptions;64extern llvm::cl::list<LVWarningKind> WarningOptions;65extern llvm::cl::list<LVInternalKind> InternalOptions;6667extern llvm::cl::list<LVCompareKind> CompareElements;68extern llvm::cl::list<LVReportKind> ReportOptions;6970extern LVOptions ReaderOptions;7172// Perform any additional post parse command line actions. Propagate the73// values captured by the command line parser, into the generic reader.74void propagateOptions();7576} // namespace cmdline77} // namespace logicalview78} // namespace llvm7980#endif // OPTIONS_H818283