[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / llvm / tools / llvm-dwarfutil / Options.h
blobe3cfa421da9134d81a628ee4b87fdf409ca4b746
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H
10 #define LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H
12 #include <cstdint>
13 #include <string>
15 namespace llvm {
16 namespace dwarfutil {
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.
27 /// The kind of accelerator table.
28 enum class DwarfUtilAccelKind : uint8_t {
29 None,
30 DWARF // DWARFv5: .debug_names
33 struct Options {
34 std::string InputFileName;
35 std::string OutputFileName;
36 bool DoGarbageCollection = false;
37 bool DoODRDeduplication = false;
38 bool BuildSeparateDebugFile = false;
39 TombstoneKind Tombstone = TombstoneKind::Universal;
40 bool Verbose = false;
41 int NumThreads = 0;
42 bool Verify = false;
43 bool UseDWARFLinkerParallel = false;
44 DwarfUtilAccelKind AccelTableKind = DwarfUtilAccelKind::None;
46 std::string getSeparateDebugFileName() const {
47 return OutputFileName + ".debug";
51 } // namespace dwarfutil
52 } // namespace llvm
54 #endif // LLVM_TOOLS_LLVM_DWARFUTIL_OPTIONS_H