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