Author: Kazu Hirata Date: 2023-05-12T18:33:26-07:00 New Revision: 81e149aab9b3676b16728e883e2f21ee938cff93
URL: https://github.com/llvm/llvm-project/commit/81e149aab9b3676b16728e883e2f21ee938cff93 DIFF: https://github.com/llvm/llvm-project/commit/81e149aab9b3676b16728e883e2f21ee938cff93.diff LOG: 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 Added: Modified: clang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h llvm/include/llvm/Transforms/IPO/Attributor.h polly/include/polly/Support/ScopHelper.h Removed: ################################################################################ diff --git a/clang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h b/clang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h index aeca616414c24..2b6cb63297915 100644 --- a/clang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h +++ b/clang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h @@ -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; diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h index b221f9cc92794..8b5497f4eeb96 100644 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h +++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h @@ -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; diff --git a/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h b/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h index f094c02e86f34..63cf5290b0c35 100644 --- a/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h +++ b/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h @@ -172,7 +172,7 @@ class RuntimeDyldChecker { 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: diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h index d4a2ed001700e..482e0868e7e7a 100644 --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -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. diff --git a/polly/include/polly/Support/ScopHelper.h b/polly/include/polly/Support/ScopHelper.h index 5001d121fa77d..17480c5381c51 100644 --- a/polly/include/polly/Support/ScopHelper.h +++ b/polly/include/polly/Support/ScopHelper.h @@ -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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits