1 //===- Options.h ------------------------------------------------*- C++ -*-===// 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 #ifndef LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 10 #define LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 11 12 #include "llvm/ADT/SmallString.h" 13 #include "llvm/ADT/StringRef.h" 14 15 namespace llvm { 16 namespace dwarfutil { 17 18 /// The kind of tombstone value. 19 enum class TombstoneKind { 20 BFD, /// 0/[1:1]. Bfd default. 21 MaxPC, /// -1/-2. Assumed to match with 22 /// http://www.dwarfstd.org/ShowIssue.php?issue=200609.1. 23 Universal, /// both: BFD + MaxPC 24 Exec, /// match with address range of executable sections. 25 }; 26 27 struct Options { 28 std::string InputFileName; 29 std::string OutputFileName; 30 bool DoGarbageCollection = false; 31 bool DoODRDeduplication = false; 32 bool BuildSeparateDebugFile = false; 33 TombstoneKind Tombstone = TombstoneKind::Universal; 34 bool Verbose = false; 35 int NumThreads = 0; 36 bool Verify = false; 37 38 std::string getSeparateDebugFileName() const { 39 return OutputFileName + ".debug"; 40 } 41 }; 42 43 } // namespace dwarfutil 44 } // namespace llvm 45 46 #endif // LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H 47