14539b441SAlexey Lapshin //===- Options.h ------------------------------------------------*- C++ -*-===// 24539b441SAlexey Lapshin // 34539b441SAlexey Lapshin // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 44539b441SAlexey Lapshin // See https://llvm.org/LICENSE.txt for license information. 54539b441SAlexey Lapshin // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 64539b441SAlexey Lapshin // 74539b441SAlexey Lapshin //===----------------------------------------------------------------------===// 84539b441SAlexey Lapshin 94539b441SAlexey Lapshin #ifndef LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 104539b441SAlexey Lapshin #define LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 114539b441SAlexey Lapshin 126b6552aaSKazu Hirata #include <cstdint> 136b6552aaSKazu Hirata #include <string> 144539b441SAlexey Lapshin 154539b441SAlexey Lapshin namespace llvm { 164539b441SAlexey Lapshin namespace dwarfutil { 174539b441SAlexey Lapshin 184539b441SAlexey Lapshin /// The kind of tombstone value. 194539b441SAlexey Lapshin enum class TombstoneKind { 204539b441SAlexey Lapshin BFD, /// 0/[1:1]. Bfd default. 214539b441SAlexey Lapshin MaxPC, /// -1/-2. Assumed to match with 224539b441SAlexey Lapshin /// http://www.dwarfstd.org/ShowIssue.php?issue=200609.1. 234539b441SAlexey Lapshin Universal, /// both: BFD + MaxPC 244539b441SAlexey Lapshin Exec, /// match with address range of executable sections. 254539b441SAlexey Lapshin }; 264539b441SAlexey Lapshin 272216ee49SAlexey Lapshin /// The kind of accelerator table. 282216ee49SAlexey Lapshin enum class DwarfUtilAccelKind : uint8_t { 292216ee49SAlexey Lapshin None, 302216ee49SAlexey Lapshin DWARF // DWARFv5: .debug_names 312216ee49SAlexey Lapshin }; 322216ee49SAlexey Lapshin 334539b441SAlexey Lapshin struct Options { 344539b441SAlexey Lapshin std::string InputFileName; 354539b441SAlexey Lapshin std::string OutputFileName; 364539b441SAlexey Lapshin bool DoGarbageCollection = false; 374539b441SAlexey Lapshin bool DoODRDeduplication = false; 384539b441SAlexey Lapshin bool BuildSeparateDebugFile = false; 394539b441SAlexey Lapshin TombstoneKind Tombstone = TombstoneKind::Universal; 404539b441SAlexey Lapshin bool Verbose = false; 414539b441SAlexey Lapshin int NumThreads = 0; 424539b441SAlexey Lapshin bool Verify = false; 43*f1fdfe68SAlexey Lapshin bool UseDWARFLinkerParallel = false; 442216ee49SAlexey Lapshin DwarfUtilAccelKind AccelTableKind = DwarfUtilAccelKind::None; 454539b441SAlexey Lapshin getSeparateDebugFileNameOptions464539b441SAlexey Lapshin std::string getSeparateDebugFileName() const { 474539b441SAlexey Lapshin return OutputFileName + ".debug"; 484539b441SAlexey Lapshin } 494539b441SAlexey Lapshin }; 504539b441SAlexey Lapshin 514539b441SAlexey Lapshin } // namespace dwarfutil 524539b441SAlexey Lapshin } // namespace llvm 534539b441SAlexey Lapshin 544539b441SAlexey Lapshin #endif // LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 55