[flang] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
This commit is contained in:
parent
29ffafb575
commit
4d4d4785e0
@ -17,6 +17,7 @@
|
||||
#include "flang/Lower/Support/Utils.h"
|
||||
#include "flang/Optimizer/Dialect/FIRType.h"
|
||||
#include "flang/Optimizer/Support/Matcher.h"
|
||||
#include <optional>
|
||||
|
||||
namespace Fortran::lower {
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "flang/Lower/IterationSpace.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
class ArrayLoadOp;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "flang/Lower/AbstractConverter.h"
|
||||
#include "flang/Lower/CallInterface.h"
|
||||
#include "flang/Optimizer/Builder/HLFIRTools.h"
|
||||
#include <optional>
|
||||
|
||||
namespace Fortran::lower {
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "flang/Lower/Support/Utils.h"
|
||||
#include "flang/Optimizer/Builder/BoxValue.h"
|
||||
#include "flang/Optimizer/Builder/FIRBuilder.h"
|
||||
#include <optional>
|
||||
|
||||
namespace mlir {
|
||||
class Location;
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "flang/Lower/AbstractConverter.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
|
||||
namespace Fortran {
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include "flang/Optimizer/Builder/FIRBuilder.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
class ExtendedValue;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "flang/Lower/StatementContext.h"
|
||||
#include "flang/Lower/SymbolMap.h"
|
||||
#include "flang/Optimizer/Builder/FIRBuilder.h"
|
||||
#include <optional>
|
||||
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include <optional>
|
||||
|
||||
namespace Fortran::lower {
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "mlir/IR/BuiltinOps.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
class AbstractArrayBox;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "flang/Optimizer/Dialect/FIROps.h"
|
||||
#include "flang/Optimizer/Dialect/FortranVariableInterface.h"
|
||||
#include "flang/Optimizer/HLFIR/HLFIRDialect.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
class FirOpBuilder;
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "llvm/Support/Process.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
using namespace Fortran::frontend;
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-bridge"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "flang/Optimizer/Support/InternalNames.h"
|
||||
#include "flang/Semantics/symbol.h"
|
||||
#include "flang/Semantics/tools.h"
|
||||
#include <optional>
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// BIND(C) mangling helpers
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "flang/Optimizer/Dialect/FIROpsSupport.h"
|
||||
#include "flang/Optimizer/HLFIR/HLFIROps.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-expr"
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-expr"
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "flang/Optimizer/Builder/Todo.h"
|
||||
#include "flang/Optimizer/HLFIR/HLFIROps.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
||||
#include <optional>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "flang/Semantics/runtime-type-info.h"
|
||||
#include "flang/Semantics/tools.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-variable"
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "flang/Evaluate/tools.h"
|
||||
#include "flang/Lower/IntrinsicCall.h"
|
||||
#include "flang/Optimizer/Builder/Todo.h"
|
||||
#include <optional>
|
||||
|
||||
/// Is this a call to MIN or MAX intrinsic with arguments that may be absent at
|
||||
/// runtime? This is a special case because MIN and MAX can have any number of
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "flang/Semantics/tools.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-host-assoc"
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "flang/Semantics/tools.h"
|
||||
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-io"
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "mlir/Dialect/Math/IR/Math.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-intrinsic"
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "flang/Lower/AbstractConverter.h"
|
||||
#include "flang/Lower/Support/Utils.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-iteration-space"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include <optional>
|
||||
|
||||
// recursively build the vector of module scopes
|
||||
static void moduleNames(const Fortran::semantics::Scope &scope,
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "flang/Runtime/time-intrinsic.h"
|
||||
#include "flang/Semantics/tools.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-runtime"
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "flang/Optimizer/Builder/Todo.h"
|
||||
#include "mlir/IR/BuiltinTypes.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
#define DEBUG_TYPE "flang-lower-symbol-map"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MD5.h"
|
||||
#include <optional>
|
||||
|
||||
static llvm::cl::opt<std::size_t>
|
||||
nameLengthHashSize("length-to-hash-string-literal",
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "flang/Optimizer/Builder/Todo.h"
|
||||
#include "flang/Optimizer/HLFIR/HLFIROps.h"
|
||||
#include "mlir/IR/BlockAndValueMapping.h"
|
||||
#include <optional>
|
||||
|
||||
// Return explicit extents. If the base is a fir.box, this won't read it to
|
||||
// return the extents and will instead return an empty vector.
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
#define GEN_PASS_DEF_TARGETREWRITEPASS
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "mlir/IR/OpImplementation.h"
|
||||
#include "llvm/ADT/TypeSwitch.h"
|
||||
#include <tuple>
|
||||
#include <optional>
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DeclareOp
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "mlir/IR/BuiltinTypes.h"
|
||||
#include "mlir/IR/Diagnostics.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include <optional>
|
||||
|
||||
static llvm::cl::opt<std::string> mainEntryName(
|
||||
"main-entry-name",
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
#define GEN_PASS_DEF_AFFINEDIALECTPROMOTION
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
#define GEN_PASS_DEF_MEMREFDATAFLOWOPT
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <optional>
|
||||
|
||||
namespace fir {
|
||||
#define GEN_PASS_DEF_SIMPLIFYINTRINSICS
|
||||
|
Loading…
x
Reference in New Issue
Block a user