#define LLVM_CLANG_APINOTES_TYPES_H
#include "clang/Basic/Specifiers.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include <climits>
+#include <optional>
#include <vector>
namespace llvm {
: Unavailable(0), UnavailableInSwift(0), SwiftPrivateSpecified(0),
SwiftPrivate(0) {}
- llvm::Optional<bool> isSwiftPrivate() const {
- return SwiftPrivateSpecified ? llvm::Optional<bool>(SwiftPrivate)
+ std::optional<bool> isSwiftPrivate() const {
+ return SwiftPrivateSpecified ? std::optional<bool>(SwiftPrivate)
: std::nullopt;
}
- void setSwiftPrivate(llvm::Optional<bool> Private) {
+ void setSwiftPrivate(std::optional<bool> Private) {
SwiftPrivateSpecified = Private.has_value();
SwiftPrivate = Private.value_or(0);
}
/// The Swift type to which a given type is bridged.
///
/// Reflects the swift_bridge attribute.
- llvm::Optional<std::string> SwiftBridge;
+ std::optional<std::string> SwiftBridge;
/// The NS error domain for this type.
- llvm::Optional<std::string> NSErrorDomain;
+ std::optional<std::string> NSErrorDomain;
public:
CommonTypeInfo() {}
- const llvm::Optional<std::string> &getSwiftBridge() const {
+ const std::optional<std::string> &getSwiftBridge() const {
return SwiftBridge;
}
- void setSwiftBridge(const llvm::Optional<std::string> &SwiftType) {
+ void setSwiftBridge(const std::optional<std::string> &SwiftType) {
SwiftBridge = SwiftType;
}
- void setSwiftBridge(const llvm::Optional<llvm::StringRef> &SwiftType) {
+ void setSwiftBridge(const std::optional<llvm::StringRef> &SwiftType) {
SwiftBridge = SwiftType
- ? llvm::Optional<std::string>(std::string(*SwiftType))
+ ? std::optional<std::string>(std::string(*SwiftType))
: std::nullopt;
}
- const llvm::Optional<std::string> &getNSErrorDomain() const {
+ const std::optional<std::string> &getNSErrorDomain() const {
return NSErrorDomain;
}
- void setNSErrorDomain(const llvm::Optional<std::string> &Domain) {
+ void setNSErrorDomain(const std::optional<std::string> &Domain) {
NSErrorDomain = Domain;
}
- void setNSErrorDomain(const llvm::Optional<llvm::StringRef> &Domain) {
- NSErrorDomain = Domain ? llvm::Optional<std::string>(std::string(*Domain))
+ void setNSErrorDomain(const std::optional<llvm::StringRef> &Domain) {
+ NSErrorDomain = Domain ? std::optional<std::string>(std::string(*Domain))
: std::nullopt;
}
///
/// Returns the default nullability, if implied, or std::nullopt if there is
/// none.
- llvm::Optional<NullabilityKind> getDefaultNullability() const {
+ std::optional<NullabilityKind> getDefaultNullability() const {
return HasDefaultNullability
- ? llvm::Optional<NullabilityKind>(
+ ? std::optional<NullabilityKind>(
static_cast<NullabilityKind>(DefaultNullability))
: std::nullopt;
}
bool hasDesignatedInits() const { return HasDesignatedInits; }
void setHasDesignatedInits(bool Value) { HasDesignatedInits = Value; }
- llvm::Optional<bool> getSwiftImportAsNonGeneric() const {
+ std::optional<bool> getSwiftImportAsNonGeneric() const {
return SwiftImportAsNonGenericSpecified
- ? llvm::Optional<bool>(SwiftImportAsNonGeneric)
+ ? std::optional<bool>(SwiftImportAsNonGeneric)
: std::nullopt;
}
- void setSwiftImportAsNonGeneric(llvm::Optional<bool> Value) {
+ void setSwiftImportAsNonGeneric(std::optional<bool> Value) {
SwiftImportAsNonGenericSpecified = Value.has_value();
SwiftImportAsNonGeneric = Value.value_or(false);
}
- llvm::Optional<bool> getSwiftObjCMembers() const {
- return SwiftObjCMembersSpecified ? llvm::Optional<bool>(SwiftObjCMembers)
+ std::optional<bool> getSwiftObjCMembers() const {
+ return SwiftObjCMembersSpecified ? std::optional<bool>(SwiftObjCMembers)
: std::nullopt;
}
- void setSwiftObjCMembers(llvm::Optional<bool> Value) {
+ void setSwiftObjCMembers(std::optional<bool> Value) {
SwiftObjCMembersSpecified = Value.has_value();
SwiftObjCMembers = Value.value_or(false);
}
public:
VariableInfo() : NullabilityAudited(false), Nullable(0) {}
- llvm::Optional<NullabilityKind> getNullability() const {
- return NullabilityAudited ? llvm::Optional<NullabilityKind>(
+ std::optional<NullabilityKind> getNullability() const {
+ return NullabilityAudited ? std::optional<NullabilityKind>(
static_cast<NullabilityKind>(Nullable))
: std::nullopt;
}
ObjCPropertyInfo()
: SwiftImportAsAccessorsSpecified(false), SwiftImportAsAccessors(false) {}
- llvm::Optional<bool> getSwiftImportAsAccessors() const {
+ std::optional<bool> getSwiftImportAsAccessors() const {
return SwiftImportAsAccessorsSpecified
- ? llvm::Optional<bool>(SwiftImportAsAccessors)
+ ? std::optional<bool>(SwiftImportAsAccessors)
: std::nullopt;
}
- void setSwiftImportAsAccessors(llvm::Optional<bool> Value) {
+ void setSwiftImportAsAccessors(std::optional<bool> Value) {
SwiftImportAsAccessorsSpecified = Value.has_value();
SwiftImportAsAccessors = Value.value_or(false);
}
ParamInfo()
: NoEscapeSpecified(false), NoEscape(false), RawRetainCountConvention() {}
- llvm::Optional<bool> isNoEscape() const {
+ std::optional<bool> isNoEscape() const {
if (!NoEscapeSpecified)
return std::nullopt;
return NoEscape;
}
- void setNoEscape(llvm::Optional<bool> Value) {
+ void setNoEscape(std::optional<bool> Value) {
NoEscapeSpecified = Value.has_value();
NoEscape = Value.value_or(false);
}
- llvm::Optional<RetainCountConventionKind> getRetainCountConvention() const {
+ std::optional<RetainCountConventionKind> getRetainCountConvention() const {
if (!RawRetainCountConvention)
return std::nullopt;
return static_cast<RetainCountConventionKind>(RawRetainCountConvention - 1);
}
void
- setRetainCountConvention(llvm::Optional<RetainCountConventionKind> Value) {
+ setRetainCountConvention(std::optional<RetainCountConventionKind> Value) {
RawRetainCountConvention = Value ? static_cast<unsigned>(*Value) + 1 : 0;
assert(getRetainCountConvention() == Value && "bitfield too small");
}
NullabilityKind getReturnTypeInfo() const { return getTypeInfo(0); }
- llvm::Optional<RetainCountConventionKind> getRetainCountConvention() const {
+ std::optional<RetainCountConventionKind> getRetainCountConvention() const {
if (!RawRetainCountConvention)
return std::nullopt;
return static_cast<RetainCountConventionKind>(RawRetainCountConvention - 1);
}
void
- setRetainCountConvention(llvm::Optional<RetainCountConventionKind> Value) {
+ setRetainCountConvention(std::optional<RetainCountConventionKind> Value) {
RawRetainCountConvention = Value ? static_cast<unsigned>(*Value) + 1 : 0;
assert(getRetainCountConvention() == Value && "bitfield too small");
}
unsigned IsFlagEnum : 1;
public:
- llvm::Optional<EnumExtensibilityKind> EnumExtensibility;
+ std::optional<EnumExtensibilityKind> EnumExtensibility;
TagInfo() : HasFlagEnum(0), IsFlagEnum(0) {}
- llvm::Optional<bool> isFlagEnum() const {
+ std::optional<bool> isFlagEnum() const {
if (HasFlagEnum)
return IsFlagEnum;
return std::nullopt;
}
- void setFlagEnum(llvm::Optional<bool> Value) {
+ void setFlagEnum(std::optional<bool> Value) {
HasFlagEnum = Value.has_value();
IsFlagEnum = Value.value_or(false);
}
/// Describes API notes data for a typedef.
class TypedefInfo : public CommonTypeInfo {
public:
- llvm::Optional<SwiftNewTypeKind> SwiftWrapper;
+ std::optional<SwiftNewTypeKind> SwiftWrapper;
TypedefInfo() {}
#ifndef LLVM_CLANG_BASIC_CLWARNINGS_H
#define LLVM_CLANG_BASIC_CLWARNINGS_H
-#include "llvm/ADT/Optional.h"
+#include <optional>
namespace clang {
/// For cl.exe warning IDs that cleany map to clang diagnostic groups,
/// returns the corresponding group. Else, returns an empty Optional.
-llvm::Optional<diag::Group> diagGroupFromCLWarningID(unsigned);
+std::optional<diag::Group> diagGroupFromCLWarningID(unsigned);
} // end namespace clang
#define CLANG_BASIC_CUSTOMIZABLEOPTIONAL_H
#include "llvm/ADT/Hashing.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/type_traits.h"
#include <cassert>
#include <new>
+#include <optional>
#include <utility>
namespace clang {
: Storage(std::in_place, std::forward<ArgTypes>(Args)...) {}
// Allow conversion from Optional<T>.
- constexpr CustomizableOptional(const llvm::Optional<T> &y)
+ constexpr CustomizableOptional(const std::optional<T> &y)
: CustomizableOptional(y ? *y : CustomizableOptional()) {}
- constexpr CustomizableOptional(llvm::Optional<T> &&y)
+ constexpr CustomizableOptional(std::optional<T> &&y)
: CustomizableOptional(y ? std::move(*y) : CustomizableOptional()) {}
CustomizableOptional &operator=(T &&y) {
}
// Allow conversion to Optional<T>.
- explicit operator llvm::Optional<T> &() const & {
- return *this ? **this : llvm::Optional<T>();
+ explicit operator std::optional<T> &() const & {
+ return *this ? **this : std::optional<T>();
}
- explicit operator llvm::Optional<T> &&() const && {
- return *this ? std::move(**this) : llvm::Optional<T>();
+ explicit operator std::optional<T> &&() const && {
+ return *this ? std::move(**this) : std::optional<T>();
}
};
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/Triple.h"
+#include <optional>
#include <set>
namespace clang {
/// If the target ID contains feature+, map it to true.
/// If the target ID contains feature-, map it to false.
/// If the target ID does not contain a feature (default), do not map it.
-llvm::Optional<llvm::StringRef>
-parseTargetID(const llvm::Triple &T, llvm::StringRef OffloadArch,
- llvm::StringMap<bool> *FeatureMap);
+std::optional<llvm::StringRef> parseTargetID(const llvm::Triple &T,
+ llvm::StringRef OffloadArch,
+ llvm::StringMap<bool> *FeatureMap);
/// Returns canonical target ID, assuming \p Processor is canonical and all
/// entries in \p Features are valid.
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitmaskEnum.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include <cstdint>
+#include <optional>
#include <set>
#include <string>
#include <unordered_map>
namespace clang {
namespace RISCV {
-using VScaleVal = llvm::Optional<unsigned>;
+using VScaleVal = std::optional<unsigned>;
// Modifier for vector type.
enum class VectorTypeModifier : uint8_t {
static const PrototypeDescriptor Mask;
static const PrototypeDescriptor Vector;
static const PrototypeDescriptor VL;
- static llvm::Optional<PrototypeDescriptor>
+ static std::optional<PrototypeDescriptor>
parsePrototypeDescriptor(llvm::StringRef PrototypeStr);
};
LMULType(int Log2LMUL);
// Return the C/C++ string representation of LMUL
std::string str() const;
- llvm::Optional<unsigned> getScale(unsigned ElementBitwidth) const;
+ std::optional<unsigned> getScale(unsigned ElementBitwidth) const;
void MulLog2LMUL(int Log2LMUL);
};
/// and LMUL with type transformers). It also record result of type in legal
/// or illegal set to avoid compute the same config again. The result maybe
/// have illegal RVVType.
- llvm::Optional<RVVTypes>
+ std::optional<RVVTypes>
computeTypes(BasicType BT, int Log2LMUL, unsigned NF,
llvm::ArrayRef<PrototypeDescriptor> Prototype);
- llvm::Optional<RVVTypePtr> computeType(BasicType BT, int Log2LMUL,
- PrototypeDescriptor Proto);
+ std::optional<RVVTypePtr> computeType(BasicType BT, int Log2LMUL,
+ PrototypeDescriptor Proto);
};
enum PolicyScheme : uint8_t {
#include "clang/Basic/CLWarnings.h"
#include "clang/Basic/DiagnosticCategories.h"
+#include <optional>
using namespace clang;
-llvm::Optional<diag::Group>
+std::optional<diag::Group>
clang::diagGroupFromCLWarningID(unsigned CLWarningID) {
switch (CLWarningID) {
case 4005: return diag::Group::MacroRedefined;
return Processor;
}
-llvm::Optional<llvm::StringRef>
+std::optional<llvm::StringRef>
parseTargetID(const llvm::Triple &T, llvm::StringRef TargetID,
llvm::StringMap<bool> *FeatureMap) {
auto OptionalProcessor =
#include "DirectoryScanner.h"
#include "llvm/Support/Path.h"
+#include <optional>
namespace clang {
using namespace llvm;
-Optional<sys::fs::file_status> getFileStatus(StringRef Path) {
+std::optional<sys::fs::file_status> getFileStatus(StringRef Path) {
sys::fs::file_status Status;
std::error_code EC = status(Path, Status);
if (EC)
#include "clang/DirectoryWatcher/DirectoryWatcher.h"
#include "llvm/Support/FileSystem.h"
+#include <optional>
#include <string>
#include <vector>
/// Gets status of file (or directory) at \p Path.
/// \returns std::nullopt if \p Path doesn't exist or can't get the status.
-llvm::Optional<llvm::sys::fs::file_status> getFileStatus(llvm::StringRef Path);
+std::optional<llvm::sys::fs::file_status> getFileStatus(llvm::StringRef Path);
} // namespace clang
#define LLVM_CLANG_ANALYZER_WEBKIT_PTRTYPESEMANTICS_H
#include "llvm/ADT/APInt.h"
-#include "llvm/ADT/Optional.h"
+#include <optional>
namespace clang {
class CXXBaseSpecifier;
/// \returns CXXRecordDecl of the base if the type is ref-countable, nullptr if
/// not, std::nullopt if inconclusive.
-llvm::Optional<const clang::CXXRecordDecl *>
-isRefCountable(const clang::CXXBaseSpecifier *Base);
+std::optional<const clang::CXXRecordDecl*>
+isRefCountable(const clang::CXXBaseSpecifier* Base);
/// \returns true if \p Class is ref-countable, false if not, std::nullopt if
/// inconclusive.
-llvm::Optional<bool> isRefCountable(const clang::CXXRecordDecl *Class);
+std::optional<bool> isRefCountable(const clang::CXXRecordDecl* Class);
/// \returns true if \p Class is ref-counted, false if not.
bool isRefCounted(const clang::CXXRecordDecl *Class);
/// \returns true if \p Class is ref-countable AND not ref-counted, false if
/// not, std::nullopt if inconclusive.
-llvm::Optional<bool> isUncounted(const clang::CXXRecordDecl *Class);
+std::optional<bool> isUncounted(const clang::CXXRecordDecl* Class);
/// \returns true if \p T is either a raw pointer or reference to an uncounted
/// class, false if not, std::nullopt if inconclusive.
-llvm::Optional<bool> isUncountedPtr(const clang::Type *T);
+std::optional<bool> isUncountedPtr(const clang::Type* T);
/// \returns true if \p F creates ref-countable object from uncounted parameter,
/// false if not.
bool isCtorOfRefCounted(const clang::FunctionDecl *F);
/// \returns true if \p M is getter of a ref-counted class, false if not.
-llvm::Optional<bool> isGetterOfRefCounted(const clang::CXXMethodDecl *Method);
+std::optional<bool> isGetterOfRefCounted(const clang::CXXMethodDecl* Method);
/// \returns true if \p F is a conversion between ref-countable or ref-counted
/// pointer types.
#include "clang/Support/RISCVVIntrinsicUtils.h"
#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
#include <numeric>
+#include <optional>
using namespace llvm;
assert(ElementBitwidth != 0 && "Bad element bitwidth!");
}
-Optional<PrototypeDescriptor> PrototypeDescriptor::parsePrototypeDescriptor(
+std::optional<PrototypeDescriptor>
+PrototypeDescriptor::parsePrototypeDescriptor(
llvm::StringRef PrototypeDescriptorStr) {
PrototypeDescriptor PD;
BaseTypeModifier PT = BaseTypeModifier::Invalid;
Scale = LMUL.getScale(ElementBitwidth);
}
-Optional<RVVTypes>
+std::optional<RVVTypes>
RVVTypeCache::computeTypes(BasicType BT, int Log2LMUL, unsigned NF,
ArrayRef<PrototypeDescriptor> Prototype) {
// LMUL x NF must be less than or equal to 8.
((uint64_t)(Proto.VTM & 0xff) << 32);
}
-Optional<RVVTypePtr> RVVTypeCache::computeType(BasicType BT, int Log2LMUL,
- PrototypeDescriptor Proto) {
+std::optional<RVVTypePtr> RVVTypeCache::computeType(BasicType BT, int Log2LMUL,
+ PrototypeDescriptor Proto) {
uint64_t Idx = computeRVVTypeHashValue(BT, Log2LMUL, Proto);
// Search first
auto It = LegalTypes.find(Idx);
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include <atomic>
+#include <optional>
using namespace llvm;
using namespace llvm::opt;
return WrappedOutput;
}
-Optional<std::string> findFile(StringRef Dir, StringRef Root,
- const Twine &Name) {
+std::optional<std::string> findFile(StringRef Dir, StringRef Root,
+ const Twine &Name) {
SmallString<128> Path;
if (Dir.startswith("="))
sys::path::append(Path, Root, Dir.substr(1), Name);
return std::nullopt;
}
-Optional<std::string> findFromSearchPaths(StringRef Name, StringRef Root,
- ArrayRef<StringRef> SearchPaths) {
+std::optional<std::string>
+findFromSearchPaths(StringRef Name, StringRef Root,
+ ArrayRef<StringRef> SearchPaths) {
for (StringRef Dir : SearchPaths)
- if (Optional<std::string> File = findFile(Dir, Root, Name))
+ if (std::optional<std::string> File = findFile(Dir, Root, Name))
return File;
return std::nullopt;
}
-Optional<std::string> searchLibraryBaseName(StringRef Name, StringRef Root,
- ArrayRef<StringRef> SearchPaths) {
+std::optional<std::string>
+searchLibraryBaseName(StringRef Name, StringRef Root,
+ ArrayRef<StringRef> SearchPaths) {
for (StringRef Dir : SearchPaths) {
- if (Optional<std::string> File = findFile(Dir, Root, "lib" + Name + ".so"))
+ if (std::optional<std::string> File =
+ findFile(Dir, Root, "lib" + Name + ".so"))
return File;
- if (Optional<std::string> File = findFile(Dir, Root, "lib" + Name + ".a"))
+ if (std::optional<std::string> File =
+ findFile(Dir, Root, "lib" + Name + ".a"))
return File;
}
return std::nullopt;
/// Search for static libraries in the linker's library path given input like
/// `-lfoo` or `-l:libfoo.a`.
-Optional<std::string> searchLibrary(StringRef Input, StringRef Root,
- ArrayRef<StringRef> SearchPaths) {
+std::optional<std::string> searchLibrary(StringRef Input, StringRef Root,
+ ArrayRef<StringRef> SearchPaths) {
if (Input.startswith(":"))
return findFromSearchPaths(Input.drop_front(), Root, SearchPaths);
return searchLibraryBaseName(Input, Root, SearchPaths);
#include <condition_variable>
#include <future>
#include <mutex>
+#include <optional>
#include <thread>
using namespace llvm;
}
// Not locking - caller has to lock Mtx.
- llvm::Optional<bool> result() const {
+ std::optional<bool> result() const {
if (ExpectedInitial.empty() && ExpectedNonInitial.empty() &&
UnexpectedInitial.empty() && UnexpectedNonInitial.empty())
return true;
#include <functional>
#include <map>
#include <memory>
+#include <optional>
#include <set>
#define DEBUG_TYPE "libclang-test"
ClangTU = clang_parseTranslationUnit(Index, fileName.c_str(), Args, 1,
nullptr, 0, TUFlags);
- llvm::Optional<CXCursor> typeRefCsr;
+ std::optional<CXCursor> typeRefCsr;
Traverse([&](CXCursor cursor, CXCursor parent) -> CXChildVisitResult {
if (cursor.kind == CXCursor_TypeRef) {
typeRefCsr.emplace(cursor);
#include "TableGenBackends.h"
#include "llvm/ADT/DenseSet.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <cctype>
#include <functional>
#include <map>
+#include <optional>
#include <set>
using namespace llvm;
namespace {
class InferPedantic {
- typedef llvm::DenseMap<const Record*,
- std::pair<unsigned, Optional<unsigned> > > GMap;
+ typedef llvm::DenseMap<const Record *,
+ std::pair<unsigned, std::optional<unsigned>>>
+ GMap;
DiagGroupParentMap &DiagGroupParents;
const std::vector<Record*> &Diags;
};
template <class Derived> struct DiagTextVisitor {
- using ModifierMappingsType = Optional<std::vector<int>>;
+ using ModifierMappingsType = std::optional<std::vector<int>>;
private:
Derived &getDerived() { return static_cast<Derived &>(*this); }
private:
DiagTextVisitor &Visitor;
- Optional<std::vector<int>> OldMappings;
+ std::optional<std::vector<int>> OldMappings;
public:
Piece *Substitution;
#include "TableGenBackends.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include <cstdint>
#include <deque>
#include <map>
+#include <optional>
#include <set>
#include <sstream>
#include <string>
/// Called by Intrinsic - this attempts to get an intrinsic that takes
/// the given types as arguments.
Intrinsic &getIntrinsic(StringRef Name, ArrayRef<Type> Types,
- Optional<std::string> MangledName);
+ std::optional<std::string> MangledName);
/// Called by Intrinsic - returns a globally-unique number.
unsigned getUniqueNumber() { return UniqueNumber++; }
N = SI->getAsUnquotedString();
else
N = emitDagArg(DI->getArg(0), "").second;
- Optional<std::string> MangledName;
+ std::optional<std::string> MangledName;
if (MatchMangledName) {
if (Intr.getRecord()->getValueAsBit("isLaneQ"))
N += "q";
//===----------------------------------------------------------------------===//
Intrinsic &NeonEmitter::getIntrinsic(StringRef Name, ArrayRef<Type> Types,
- Optional<std::string> MangledName) {
+ std::optional<std::string> MangledName) {
// First, look up the name in the intrinsic map.
assert_with_loc(IntrinsicMap.find(Name.str()) != IntrinsicMap.end(),
("Intrinsic '" + Name + "' not found!").str());
#include "llvm/TableGen/Error.h"
#include "llvm/TableGen/Record.h"
#include <numeric>
+#include <optional>
using namespace llvm;
using namespace clang::RISCV;
for (char I : TypeRange) {
for (int Log2LMUL : Log2LMULList) {
BasicType BT = ParseBasicType(I);
- Optional<RVVTypes> Types =
+ std::optional<RVVTypes> Types =
TypeCache.computeTypes(BT, Log2LMUL, NF, Prototype);
// Ignored to create new intrinsic if there are any illegal types.
if (!Types)
BasicPrototype, /*IsMasked=*/false,
/*HasMaskedOffOperand=*/false, HasVL, NF,
IsPrototypeDefaultTU, UnMaskedPolicyScheme, P);
- Optional<RVVTypes> PolicyTypes =
+ std::optional<RVVTypes> PolicyTypes =
TypeCache.computeTypes(BT, Log2LMUL, NF, PolicyPrototype);
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr, IRName,
if (!HasMasked)
continue;
// Create a masked intrinsic
- Optional<RVVTypes> MaskTypes =
+ std::optional<RVVTypes> MaskTypes =
TypeCache.computeTypes(BT, Log2LMUL, NF, Prototype);
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr, MaskedIRName,
RVVIntrinsic::computeBuiltinTypes(
BasicPrototype, /*IsMasked=*/true, HasMaskedOffOperand, HasVL,
NF, IsPrototypeDefaultTU, MaskedPolicyScheme, P);
- Optional<RVVTypes> PolicyTypes =
+ std::optional<RVVTypes> PolicyTypes =
TypeCache.computeTypes(BT, Log2LMUL, NF, PolicyPrototype);
Out.push_back(std::make_unique<RVVIntrinsic>(
Name, SuffixStr, OverloadedName, OverloadedSuffixStr,