FLANG
LoweringOptions.h
Go to the documentation of this file.
1//===- LoweringOptions.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//===----------------------------------------------------------------------===//
13//===----------------------------------------------------------------------===//
14
15#ifndef FLANG_LOWER_LOWERINGOPTIONS_H
16#define FLANG_LOWER_LOWERINGOPTIONS_H
17
19
20namespace Fortran::lower {
21
23public:
24#define LOWERINGOPT(Name, Bits, Default) unsigned Name : Bits;
25#define ENUM_LOWERINGOPT(Name, Type, Bits, Default)
26#include "flang/Lower/LoweringOptions.def"
27
28protected:
29#define LOWERINGOPT(Name, Bits, Default)
30#define ENUM_LOWERINGOPT(Name, Type, Bits, Default) unsigned Name : Bits;
31#include "flang/Lower/LoweringOptions.def"
32};
33
35
36public:
37#define LOWERINGOPT(Name, Bits, Default)
38#define ENUM_LOWERINGOPT(Name, Type, Bits, Default) \
39 Type get##Name() const { return static_cast<Type>(Name); } \
40 LoweringOptions &set##Name(Type Value) { \
41 Name = static_cast<unsigned>(Value); \
42 return *this; \
43 }
44#include "flang/Lower/LoweringOptions.def"
45
47
48 const Fortran::common::MathOptionsBase &getMathOptions() const {
49 return MathOptions;
50 }
51
52 Fortran::common::MathOptionsBase &getMathOptions() { return MathOptions; }
53
54private:
57};
58
59} // namespace Fortran::lower
60
61#endif // FLANG_LOWER_LOWERINGOPTIONS_H
Definition: MathOptionsBase.h:22
Definition: LoweringOptions.h:22
Definition: LoweringOptions.h:34
Definition: AbstractConverter.h:59