mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 13:50:11 +00:00
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:
parent
db39d47928
commit
81e149aab9
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user