FLANG
EnvironmentDefaults.h
1//===-- EnvironmentDefaults.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// EnvironmentDefaults is a list of default values for environment variables
10// that may be specified at compile time and set by the runtime during
11// program startup if the variable is not already present in the environment.
12// EnvironmentDefaults is intended to allow options controlled by environment
13// variables to also be set on the command line at compile time without needing
14// to define option-specific runtime calls or duplicate logic within the
15// runtime. For example, the -fconvert command line option is implemented in
16// terms of an default value for the FORT_CONVERT environment variable.
17
18#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_ENVIRONMENTDEFAULTS_H
19#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_ENVIRONMENTDEFAULTS_H
20
21#include <vector>
22
23namespace fir {
24class FirOpBuilder;
25class GlobalOp;
26} // namespace fir
27
28namespace mlir {
29class Location;
30class Value;
31} // namespace mlir
32
33namespace Fortran::lower {
34struct EnvironmentDefault;
35} // namespace Fortran::lower
36
37namespace fir::runtime {
38
42mlir::Value genEnvironmentDefaults(
43 fir::FirOpBuilder &builder, mlir::Location loc,
44 const std::vector<Fortran::lower::EnvironmentDefault> &envDefaults);
45
46} // namespace fir::runtime
47#endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_ENVIRONMENTDEFAULTS_H
Definition: FIRBuilder.h:55
Definition: AbstractConverter.h:59
Definition: AbstractConverter.h:31
@ Value
Lower argument to a value. Mainly intended for scalar arguments.
Definition: AbstractConverter.h:27