Replace None with std::nullopt in comments (NFC)

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:
Kazu Hirata 2023-05-12 18:33:26 -07:00
parent db39d47928
commit 81e149aab9
5 changed files with 6 additions and 6 deletions

View File

@ -80,7 +80,7 @@ struct DirectiveTree {
/// The directive terminating the conditional, should be #endif.
Directive End;
/// The index of the conditional branch we chose as active.
/// None indicates no branch was taken (e.g. #if 0 ... #endif).
/// std::nullopt indicates no branch was taken (e.g. #if 0 ... #endif).
/// The initial tree from `parse()` has no branches marked as taken.
/// See `chooseConditionalBranches()`.
std::optional<unsigned> Taken;

View File

@ -19,7 +19,7 @@ class raw_ostream;
/// Typically used in DW_AT_location attributes to describe the location of
/// objects.
struct DWARFLocationExpression {
/// The address range in which this expression is valid. None denotes a
/// The address range in which this expression is valid. std::nullopt denotes a
/// default entry which is valid in addresses not covered by other location
/// expressions, or everywhere if there are no other expressions.
std::optional<DWARFAddressRange> Range;

View File

@ -172,7 +172,7 @@ public:
bool LocalAddress);
/// If there is a section at the given local address, return its load
/// address, otherwise return none.
/// address, otherwise return std::nullopt.
std::optional<uint64_t> getSectionLoadAddress(void *LocalAddress) const;
private:

View File

@ -5554,8 +5554,8 @@ struct AAPointerInfo : public AbstractAttribute {
/// The instruction responsible for the access.
Instruction *RemoteI;
/// The value written, if any. `llvm::none` means "not known yet", `nullptr`
/// cannot be determined.
/// The value written, if any. `std::nullopt` means "not known yet",
/// `nullptr` cannot be determined.
std::optional<Value *> Content;
/// Set of potential ranges accessed from the base pointer.

View File

@ -522,7 +522,7 @@ bool hasDebugCall(ScopStmt *Stmt);
/// !{ !"Name" }
///
/// Then `nullptr` is set to mark the property is existing, but does not carry
/// any value. If the property does not exist, `None` is returned.
/// any value. If the property does not exist, `std::nullopt` is returned.
std::optional<llvm::Metadata *> findMetadataOperand(llvm::MDNode *LoopMD,
llvm::StringRef Name);