1 //===--- CodeGenOptions.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 //  This file defines the CodeGenOptions interface, which holds the
10 //  configuration for LLVM's middle-end and back-end. It controls LLVM's code
11 //  generation into assembly or machine code.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H
16 #define LLVM_CLANG_BASIC_CODEGENOPTIONS_H
17 
18 #include "llvm/Support/CodeGen.h"
19 #include "llvm/Support/Regex.h"
20 #include "llvm/Target/TargetOptions.h"
21 #include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
22 #include <map>
23 #include <memory>
24 #include <string>
25 #include <vector>
26 
27 namespace Fortran::frontend {
28 
29 /// Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure
30 /// that this large collection of bitfields is a trivial class type.
31 class CodeGenOptionsBase {
32 
33 public:
34 #define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
35 #include "flang/Frontend/CodeGenOptions.def"
36 
37 protected:
38 #define CODEGENOPT(Name, Bits, Default)
39 #include "flang/Frontend/CodeGenOptions.def"
40 };
41 
42 /// Tracks various options which control how the code is optimized and passed
43 /// to the LLVM backend.
44 class CodeGenOptions : public CodeGenOptionsBase {
45 
46 public:
47   CodeGenOptions();
48 };
49 
50 } // end namespace Fortran::frontend
51 
52 #endif
53