xref: /llvm-project/flang/include/flang/Frontend/TargetOptions.h (revision 8e14c6c172b122203f46a9ad114d51c74535cbb7)
1 //===--- TargetOptions.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 /// \file
10 /// Defines the flang::TargetOptions class.
11 ///
12 //===----------------------------------------------------------------------===//
13 //
14 // Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
15 //
16 //===----------------------------------------------------------------------===//
17 
18 #ifndef FORTRAN_FRONTEND_TARGETOPTIONS_H
19 #define FORTRAN_FRONTEND_TARGETOPTIONS_H
20 
21 #include <string>
22 #include <vector>
23 
24 namespace Fortran::frontend {
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   /// If given, the name of the target CPU to generate code for.
33   std::string cpu;
34 
35   /// If given, the name of the target CPU to tune code for.
36   std::string cpuToTuneFor;
37 
38   /// The list of target specific features to enable or disable, as written on
39   /// the command line.
40   std::vector<std::string> featuresAsWritten;
41 
42   /// The real KINDs disabled for this target
43   std::vector<int> disabledRealKinds;
44 
45   /// The integer KINDs disabled for this target
46   std::vector<int> disabledIntegerKinds;
47 
48   /// Extended Altivec ABI on AIX
49   bool EnableAIXExtendedAltivecABI;
50 };
51 
52 } // end namespace Fortran::frontend
53 
54 #endif
55