]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Basic / TargetOptions.h
1 //===--- TargetOptions.h ----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// Defines the clang::TargetOptions class.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CLANG_BASIC_TARGETOPTIONS_H
16 #define LLVM_CLANG_BASIC_TARGETOPTIONS_H
17
18 #include "clang/Basic/OpenCLOptions.h"
19 #include "llvm/Support/VersionTuple.h"
20 #include "llvm/Target/TargetOptions.h"
21 #include <string>
22 #include <vector>
23
24 namespace clang {
25
26 /// Options for controlling the target.
27 class TargetOptions {
28 public:
29   /// The name of the target triple to compile for.
30   std::string Triple;
31
32   /// When compiling for the device side, contains the triple used to compile
33   /// for the host.
34   std::string HostTriple;
35
36   /// If given, the name of the target CPU to generate code for.
37   std::string CPU;
38
39   /// If given, the unit to use for floating point math.
40   std::string FPMath;
41
42   /// If given, the name of the target ABI to use.
43   std::string ABI;
44
45   /// The EABI version to use
46   llvm::EABI EABIVersion;
47
48   /// If given, the version string of the linker in use.
49   std::string LinkerVersion;
50
51   /// The list of target specific features to enable or disable, as written on the command line.
52   std::vector<std::string> FeaturesAsWritten;
53
54   /// The list of target specific features to enable or disable -- this should
55   /// be a list of strings starting with by '+' or '-'.
56   std::vector<std::string> Features;
57
58   /// Supported OpenCL extensions and optional core features.
59   OpenCLOptions SupportedOpenCLOptions;
60
61   /// The list of OpenCL extensions to enable or disable, as written on
62   /// the command line.
63   std::vector<std::string> OpenCLExtensionsAsWritten;
64
65   /// If given, enables support for __int128_t and __uint128_t types.
66   bool ForceEnableInt128 = false;
67
68   /// \brief If enabled, use 32-bit pointers for accessing const/local/shared
69   /// address space.
70   bool NVPTXUseShortPointers = false;
71
72   // The code model to be used as specified by the user. Corresponds to
73   // CodeModel::Model enum defined in include/llvm/Support/CodeGen.h, plus
74   // "default" for the case when the user has not explicitly specified a
75   // code model.
76   std::string CodeModel;
77
78   /// The version of the SDK which was used during the compilation.
79   llvm::VersionTuple SDKVersion;
80 };
81
82 }  // end namespace clang
83
84 #endif