clang  9.0.0svn
TargetOptions.h
Go to the documentation of this file.
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 
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.
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.
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
OpenCL supported extensions and optional core features.
Definition: OpenCLOptions.h:23
Options for controlling the target.
Definition: TargetOptions.h:27
std::string HostTriple
When compiling for the device side, contains the triple used to compile for the host.
Definition: TargetOptions.h:34
std::string FPMath
If given, the unit to use for floating point math.
Definition: TargetOptions.h:40
OpenCLOptions SupportedOpenCLOptions
Supported OpenCL extensions and optional core features.
Definition: TargetOptions.h:59
std::string LinkerVersion
If given, the version string of the linker in use.
Definition: TargetOptions.h:49
bool ForceEnableInt128
If given, enables support for __int128_t and __uint128_t types.
Definition: TargetOptions.h:66
std::string CPU
If given, the name of the target CPU to generate code for.
Definition: TargetOptions.h:37
Defines the clang::OpenCLOptions class.
std::string ABI
If given, the name of the target ABI to use.
Definition: TargetOptions.h:43
std::vector< std::string > OpenCLExtensionsAsWritten
The list of OpenCL extensions to enable or disable, as written on the command line.
Definition: TargetOptions.h:63
std::vector< std::string > Features
The list of target specific features to enable or disable – this should be a list of strings startin...
Definition: TargetOptions.h:56
std::vector< std::string > FeaturesAsWritten
The list of target specific features to enable or disable, as written on the command line...
Definition: TargetOptions.h:52
llvm::EABI EABIVersion
The EABI version to use.
Definition: TargetOptions.h:46
Dataflow Directional Tag Classes.
bool NVPTXUseShortPointers
If enabled, use 32-bit pointers for accessing const/local/shared address space.
Definition: TargetOptions.h:70
std::string CodeModel
Definition: TargetOptions.h:76
llvm::VersionTuple SDKVersion
The version of the SDK which was used during the compilation.
Definition: TargetOptions.h:79
std::string Triple
The name of the target triple to compile for.
Definition: TargetOptions.h:30