1 //===- MCTargetOptions.h - MC Target Options --------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_MC_MCTARGETOPTIONS_H
10 #define LLVM_MC_MCTARGETOPTIONS_H
17 enum class ExceptionHandling
{
18 None
, /// No exception support
19 DwarfCFI
, /// DWARF-like instruction based exceptions
20 SjLj
, /// setjmp/longjmp based exceptions
22 WinEH
, /// Windows Exception Handling
23 Wasm
, /// WebAssembly Exception Handling
26 enum class DebugCompressionType
{
27 None
, /// No compression
28 GNU
, /// zlib-gnu style compression
29 Z
, /// zlib style complession
34 class MCTargetOptions
{
36 enum AsmInstrumentation
{
37 AsmInstrumentationNone
,
38 AsmInstrumentationAddress
41 /// Enables AddressSanitizer instrumentation at machine level.
42 bool SanitizeAddress
: 1;
45 bool MCNoExecStack
: 1;
46 bool MCFatalWarnings
: 1;
48 bool MCNoDeprecatedWarn
: 1;
49 bool MCSaveTempLabels
: 1;
50 bool MCUseDwarfDirectory
: 1;
51 bool MCIncrementalLinkerCompatible
: 1;
52 bool MCPIECopyRelocations
: 1;
53 bool ShowMCEncoding
: 1;
57 /// Preserve Comments in Assembly.
58 bool PreserveAsmComments
: 1;
63 std::string SplitDwarfFile
;
65 /// Additional paths to search for `.include` directives when using the
66 /// integrated assembler.
67 std::vector
<std::string
> IASSearchPaths
;
71 /// getABIName - If this returns a non-empty string this represents the
72 /// textual name of the ABI that we want the backend to use, e.g. o32, or
74 StringRef
getABIName() const;
77 } // end namespace llvm
79 #endif // LLVM_MC_MCTARGETOPTIONS_H