#ifndef LLVM_ASMPARSER_PARSER_H
#define LLVM_ASMPARSER_PARSER_H
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringRef.h"
#include <memory>
+#include <optional>
namespace llvm {
class SMDiagnostic;
class Type;
-typedef llvm::function_ref<Optional<std::string>(StringRef)>
+typedef llvm::function_ref<std::optional<std::string>(StringRef)>
DataLayoutCallbackTy;
/// This function is a main interface to the LLVM Assembly Parser. It parses
#include "llvm/Support/MemoryBufferRef.h"
#include <cstdint>
#include <memory>
+#include <optional>
#include <string>
#include <system_error>
#include <vector>
class MemoryBuffer;
class ModuleSummaryIndex;
-typedef llvm::function_ref<Optional<std::string>(StringRef)>
+typedef llvm::function_ref<std::optional<std::string>(StringRef)>
DataLayoutCallbackTy;
// These functions are for converting Expected/Error values to
#define LLVM_CODEGEN_MIRPARSER_MIRPARSER_H
#include "llvm/ADT/None.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringRef.h"
#include <functional>
#include <memory>
+#include <optional>
namespace llvm {
class SMDiagnostic;
class StringRef;
-typedef llvm::function_ref<Optional<std::string>(StringRef)>
+typedef llvm::function_ref<std::optional<std::string>(StringRef)>
DataLayoutCallbackTy;
/// This class initializes machine functions by applying the state loaded from
#ifndef LLVM_IRREADER_IRREADER_H
#define LLVM_IRREADER_IRREADER_H
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/STLFunctionalExtras.h"
#include "llvm/ADT/StringRef.h"
#include <memory>
+#include <optional>
namespace llvm {
class SMDiagnostic;
class LLVMContext;
-typedef llvm::function_ref<Optional<std::string>(StringRef)>
+typedef llvm::function_ref<std::optional<std::string>(StringRef)>
DataLayoutCallbackTy;
/// If the given MemoryBuffer holds a bitcode image, return a Module
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
+#include <optional>
#include <system_error>
using namespace llvm;
// If user just wants to list available options, skip module loading
if (!SkipModule) {
auto SetDataLayout =
- [&](StringRef DataLayoutTargetTriple) -> Optional<std::string> {
+ [&](StringRef DataLayoutTargetTriple) -> std::optional<std::string> {
// If we are supposed to override the target triple, do so now.
std::string IRTargetTriple = DataLayoutTargetTriple.str();
if (!TargetTriple.empty())
#include "llvm/Support/SystemUtils.h"
#include "llvm/Support/ToolOutputFile.h"
#include <memory>
+#include <optional>
using namespace llvm;
cl::OptionCategory AsCat("llvm-as Options");
// Parse the file now...
SMDiagnostic Err;
- auto SetDataLayout = [](StringRef) -> Optional<std::string> {
+ auto SetDataLayout = [](StringRef) -> std::optional<std::string> {
if (ClDataLayout.empty())
return std::nullopt;
return ClDataLayout;
#include "llvm/Support/WithColor.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/Cloning.h"
+#include <optional>
extern cl::OptionCategory LLVMReduceOptions;
static cl::opt<std::string> TargetTriple("mtriple",
createMIRParser(std::move(FileOrErr.get()), Ctxt);
auto SetDataLayout =
- [&](StringRef DataLayoutTargetTriple) -> Optional<std::string> {
+ [&](StringRef DataLayoutTargetTriple) -> std::optional<std::string> {
// If we are supposed to override the target triple, do so now.
std::string IRTargetTriple = DataLayoutTargetTriple.str();
if (!TargetTriple.empty())
#include "llvm/Transforms/Utils/Debugify.h"
#include <algorithm>
#include <memory>
+#include <optional>
using namespace llvm;
using namespace opt_tool;
std::unique_ptr<ToolOutputFile> RemarksFile = std::move(*RemarksFileOrErr);
// Load the input module...
- auto SetDataLayout = [](StringRef) -> Optional<std::string> {
+ auto SetDataLayout = [](StringRef) -> std::optional<std::string> {
if (ClDataLayout.empty())
return std::nullopt;
return ClDataLayout;