/// defaults and -resource-dir compiler flag).
/// If None, ClangdServer calls CompilerInvocation::GetResourcePath() to
/// obtain the standard resource directory.
- std::optional<std::string> ResourceDir = std::nullopt;
+ std::optional<std::string> ResourceDir;
/// Time to wait after a new file version before computing diagnostics.
DebouncePolicy UpdateDebounce = DebouncePolicy{
/// This optional continuation allows the generation of those dereferences.
/// These accesses are always on Fortran entities of record types, which are
/// implicitly in-memory objects.
- std::optional<ExtendRefFunc> extendCoorRef = std::nullopt;
+ std::optional<ExtendRefFunc> extendCoorRef;
private:
void setPC(bool isImplicit);
assert(stmt.typedCall && "Call was not analyzed");
mlir::Value res{};
if (bridge.getLoweringOptions().getLowerToHighLevelFIR()) {
- std::optional<mlir::Type> resultType = std::nullopt;
+ std::optional<mlir::Type> resultType;
if (stmt.typedCall->hasAlternateReturns())
resultType = builder->getIndexType();
auto hlfirRes = Fortran::lower::convertCallToHLFIR(
std::optional<unsigned>
Fortran::lower::CallerInterface::getPassArgIndex() const {
unsigned passArgIdx = 0;
- std::optional<unsigned> passArg = std::nullopt;
+ std::optional<unsigned> passArg;
for (const auto &arg : getCallDescription().arguments()) {
if (arg && arg->isPassedObject()) {
passArg = passArgIdx;
// not use the cached MemoryBuffer directly to ensure dsymutil does not
// race with the cache pruner.
StringRef objBuf;
- std::optional<StringRef> cachePath = std::nullopt;
+ std::optional<StringRef> cachePath;
if (files[i]) {
objBuf = files[i]->getBuffer();
cachePath = files[i]->getBufferIdentifier();
/// it is out of date.
struct CacheSignature {
/// UUID of object file or module.
- std::optional<UUID> m_uuid = std::nullopt;
+ std::optional<UUID> m_uuid;
/// Modification time of file on disk.
- std::optional<std::time_t> m_mod_time = std::nullopt;
+ std::optional<std::time_t> m_mod_time;
/// If this describes a .o file with a BSD archive, the BSD archive's
/// modification time will be in m_mod_time, and the .o file's modification
/// time will be in this m_obj_mod_time.
- std::optional<std::time_t> m_obj_mod_time = std::nullopt;
+ std::optional<std::time_t> m_obj_mod_time;
CacheSignature() = default;
class SerialPort : public NativeFile {
public:
struct Options {
- std::optional<unsigned int> BaudRate = std::nullopt;
- std::optional<Terminal::Parity> Parity = std::nullopt;
- std::optional<Terminal::ParityCheck> ParityCheck = std::nullopt;
- std::optional<unsigned int> StopBits = std::nullopt;
+ std::optional<unsigned int> BaudRate;
+ std::optional<Terminal::Parity> Parity;
+ std::optional<Terminal::ParityCheck> ParityCheck;
+ std::optional<unsigned int> StopBits;
};
// Obtain Options corresponding to the passed URL query string
/// For each instruction, print the instruction kind.
bool show_control_flow_kind = false;
/// Optional custom id to start traversing from.
- std::optional<uint64_t> id = std::nullopt;
+ std::optional<uint64_t> id;
/// Optional number of instructions to skip from the starting position
/// of the cursor.
- std::optional<size_t> skip = std::nullopt;
+ std::optional<size_t> skip;
};
/// Class used to dump the instructions of a \a TraceCursor using its current
// cpu is seen.
std::map<uint64_t, lldb::cpu_id_t> m_cpus;
/// This is the chronologically last CPU ID.
- std::optional<uint64_t> m_last_cpu = std::nullopt;
+ std::optional<uint64_t> m_last_cpu;
// The PSB offsets are stored as a map. It maps `item index -> psb offset`.
llvm::DenseMap<uint64_t, lldb::addr_t> m_psb_offsets;
const size_t kDefaultIptTraceSize = 4 * 1024; // 4KB
const size_t kDefaultProcessBufferSizeLimit = 5 * 1024 * 1024; // 500MB
const bool kDefaultEnableTscValue = false;
-const std::optional<size_t> kDefaultPsbPeriod = std::nullopt;
+const std::optional<size_t> kDefaultPsbPeriod;
const bool kDefaultPerCpuTracing = false;
const bool kDefaultDisableCgroupFiltering = false;
struct LinalgPromotionOptions {
/// Indices of subViews to promote. If `std::nullopt`, try to promote all
/// operands.
- std::optional<DenseSet<unsigned>> operandsToPromote = std::nullopt;
+ std::optional<DenseSet<unsigned>> operandsToPromote;
LinalgPromotionOptions &setOperandsToPromote(ArrayRef<int64_t> operands) {
operandsToPromote = DenseSet<unsigned>();
operandsToPromote->insert(operands.begin(), operands.end());
/// Otherwise the partial view will be used. The decision is defaulted to
/// `useFullTileBuffersDefault` when `useFullTileBuffers` is None and for
/// operands missing from `useFullTileBuffers`.
- std::optional<llvm::SmallBitVector> useFullTileBuffers = std::nullopt;
+ std::optional<llvm::SmallBitVector> useFullTileBuffers;
LinalgPromotionOptions &setUseFullTileBuffers(ArrayRef<bool> useFullTiles) {
unsigned size = useFullTiles.size();
llvm::SmallBitVector tmp(size, false);
return *this;
}
/// Alignment of promoted buffer. If `std::nullopt` do not specify alignment.
- std::optional<unsigned> alignment = std::nullopt;
+ std::optional<unsigned> alignment;
LinalgPromotionOptions &setAlignment(unsigned align) {
alignment = align;
return *this;
/// Callback function to do the allocation of the promoted buffer. If
/// std::nullopt, then the default allocation scheme of allocating a
/// memref<?xi8> buffer followed by a view operation is used.
- std::optional<AllocBufferCallbackFn> allocationFn = std::nullopt;
- std::optional<DeallocBufferCallbackFn> deallocationFn = std::nullopt;
+ std::optional<AllocBufferCallbackFn> allocationFn;
+ std::optional<DeallocBufferCallbackFn> deallocationFn;
LinalgPromotionOptions &
setAllocationDeallocationFns(AllocBufferCallbackFn const &allocFn,
DeallocBufferCallbackFn const &deallocFn) {
}
/// Callback function to do the copy of data to and from the promoted
/// subview. If std::nullopt then a memref.copy is used.
- std::optional<CopyCallbackFn> copyInFn = std::nullopt;
- std::optional<CopyCallbackFn> copyOutFn = std::nullopt;
+ std::optional<CopyCallbackFn> copyInFn;
+ std::optional<CopyCallbackFn> copyOutFn;
LinalgPromotionOptions &setCopyInOutFns(CopyCallbackFn const ©In,
CopyCallbackFn const ©Out) {
copyInFn = copyIn;
SmallVector<int64_t> tileInterchange;
/// When specified, specifies distribution of generated tile loops to
/// processors.
- std::optional<LinalgLoopDistributionOptions> tileDistribution = std::nullopt;
+ std::optional<LinalgLoopDistributionOptions> tileDistribution;
LinalgTilingAndFusionOptions &
setDistributionOptions(LinalgLoopDistributionOptions distributionOptions) {
tileDistribution = std::move(distributionOptions);
/// When specified, specifies distribution of generated tile loops to
/// processors.
- std::optional<LinalgLoopDistributionOptions> distribution = std::nullopt;
+ std::optional<LinalgLoopDistributionOptions> distribution;
LinalgTilingOptions &
setDistributionOptions(LinalgLoopDistributionOptions distributionOptions) {
/// `jitCodeGenOptLevel`, when provided, is used as the optimization level for
/// target code generation.
- std::optional<llvm::CodeGenOpt::Level> jitCodeGenOptLevel = std::nullopt;
+ std::optional<llvm::CodeGenOpt::Level> jitCodeGenOptLevel;
/// If `sharedLibPaths` are provided, the underlying JIT-compilation will
/// open and link the shared libraries for symbol resolution.
const DenseSet<OpOperand *> &usesWrite,
const AnalysisState &state) {
const BufferizationOptions &options = state.getOptions();
- std::optional<Region *> commonEnclosingRegion = std::nullopt;
+ std::optional<Region *> commonEnclosingRegion;
// In case of a write, take the region in which the write takes place.
for (OpOperand *uWrite : usesWrite) {
Type StorageSpecifierType::getFieldType(StorageSpecifierKind kind,
std::optional<APInt> dim) const {
- std::optional<unsigned> intDim = std::nullopt;
+ std::optional<unsigned> intDim;
if (dim)
intDim = dim.value().getZExtValue();
return getFieldType(kind, intDim);
} else {
auto enc = op.getSpecifier().getType().getEncoding();
StorageLayout layout(enc);
- std::optional<unsigned> dim = std::nullopt;
+ std::optional<unsigned> dim;
if (op.getDim())
dim = op.getDim().value().getZExtValue();
unsigned idx = layout.getMemRefFieldIndex(op.getSpecifierKind(), dim);
static std::optional<int64_t> getUniqueNonUnitDim(ArrayRef<int64_t> indices,
ArrayRef<int64_t> shape) {
// Return false if more than one of the dimensions in this group are not 1.
- std::optional<int64_t> dimIndex = std::nullopt;
+ std::optional<int64_t> dimIndex;
if (indices.size() < 2)
return std::nullopt;
for (int64_t idx : indices) {