Author: Kazu Hirata Date: 2022-12-04T20:11:39-08:00 New Revision: 768cae4a5ab3a564b25ed36c379423f71b42d9d0
URL: https://github.com/llvm/llvm-project/commit/768cae4a5ab3a564b25ed36c379423f71b42d9d0 DIFF: https://github.com/llvm/llvm-project/commit/768cae4a5ab3a564b25ed36c379423f71b42d9d0.diff LOG: [lldb] Use std::nullopt instead of None 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: lldb/include/lldb/Breakpoint/BreakpointID.h lldb/include/lldb/Core/Communication.h lldb/include/lldb/Core/SourceLocationSpec.h lldb/include/lldb/Core/ThreadedCommunication.h lldb/include/lldb/Interpreter/CommandObject.h lldb/include/lldb/Symbol/Function.h lldb/include/lldb/Target/MemoryTagMap.h lldb/include/lldb/Target/PathMappingList.h lldb/include/lldb/Target/TraceCursor.h lldb/include/lldb/Target/TraceDumper.h lldb/include/lldb/Utility/FileSpec.h lldb/include/lldb/Utility/StringExtractorGDBRemote.h lldb/include/lldb/Utility/Timeout.h lldb/include/lldb/Utility/TraceGDBRemotePackets.h lldb/source/API/SBCommandInterpreter.cpp lldb/source/Breakpoint/BreakpointResolverFileLine.cpp lldb/source/Expression/Materializer.cpp lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h lldb/source/Plugins/SymbolFile/DWARF/DIERef.h lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h lldb/source/Plugins/Trace/intel-pt/DecodedThread.h lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h lldb/source/Target/MemoryTagMap.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Breakpoint/BreakpointID.h b/lldb/include/lldb/Breakpoint/BreakpointID.h index 64432f2d3cd5c..d3d75f81fd34e 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointID.h +++ b/lldb/include/lldb/Breakpoint/BreakpointID.h @@ -55,7 +55,7 @@ class BreakpointID { /// A string containing JUST the breakpoint description. /// \return /// If \p input was not a valid breakpoint ID string, returns - /// \b llvm::None. Otherwise returns a BreakpointID with members filled + /// \b std::nullopt. Otherwise returns a BreakpointID with members filled /// out accordingly. static llvm::Optional<BreakpointID> ParseCanonicalReference(llvm::StringRef input); diff --git a/lldb/include/lldb/Core/Communication.h b/lldb/include/lldb/Core/Communication.h index a0151527fe5de..f5f636816cb4f 100644 --- a/lldb/include/lldb/Core/Communication.h +++ b/lldb/include/lldb/Core/Communication.h @@ -100,7 +100,7 @@ class Communication { /// number of bytes that can be placed into \a dst. /// /// \param[in] timeout - /// A timeout value or llvm::None for no timeout. + /// A timeout value or std::nullopt for no timeout. /// /// \return /// The number of bytes actually read. diff --git a/lldb/include/lldb/Core/SourceLocationSpec.h b/lldb/include/lldb/Core/SourceLocationSpec.h index 3b58b2818d22f..5463b402e6d5a 100644 --- a/lldb/include/lldb/Core/SourceLocationSpec.h +++ b/lldb/include/lldb/Core/SourceLocationSpec.h @@ -29,7 +29,7 @@ class SourceLocationSpec { /// Constructor. /// /// Takes a \a file_spec with a \a line number and a \a column number. If - /// \a column is null or not provided, it is set to llvm::None. + /// \a column is null or not provided, it is set to std::nullopt. /// /// \param[in] file_spec /// The full or partial path to a file. diff --git a/lldb/include/lldb/Core/ThreadedCommunication.h b/lldb/include/lldb/Core/ThreadedCommunication.h index b7412c796f107..2e3afde3c0582 100644 --- a/lldb/include/lldb/Core/ThreadedCommunication.h +++ b/lldb/include/lldb/Core/ThreadedCommunication.h @@ -131,7 +131,7 @@ class ThreadedCommunication : public Communication, public Broadcaster { /// number of bytes that can be placed into \a dst. /// /// \param[in] timeout - /// A timeout value or llvm::None for no timeout. + /// A timeout value or std::nullopt for no timeout. /// /// \return /// The number of bytes actually read. diff --git a/lldb/include/lldb/Interpreter/CommandObject.h b/lldb/include/lldb/Interpreter/CommandObject.h index 03f5aef7d5d6c..8ac251c5f5fe1 100644 --- a/lldb/include/lldb/Interpreter/CommandObject.h +++ b/lldb/include/lldb/Interpreter/CommandObject.h @@ -273,7 +273,7 @@ class CommandObject : public std::enable_shared_from_this<CommandObject> { /// The command arguments. /// /// \return - /// llvm::None if there is no special repeat command - it will use the + /// std::nullopt if there is no special repeat command - it will use the /// current command line. /// Otherwise a std::string containing the command to be repeated. /// If the string is empty, the command won't be allow repeating. diff --git a/lldb/include/lldb/Symbol/Function.h b/lldb/include/lldb/Symbol/Function.h index 3eb4f5d7dedf4..2da13f878a799 100644 --- a/lldb/include/lldb/Symbol/Function.h +++ b/lldb/include/lldb/Symbol/Function.h @@ -485,7 +485,7 @@ class Function : public UserID, public SymbolContextScope { llvm::ArrayRef<std::unique_ptr<CallEdge>> GetCallEdges(); /// Get the outgoing tail-calling edges from this function. If none exist, - /// return None. + /// return std::nullopt. llvm::ArrayRef<std::unique_ptr<CallEdge>> GetTailCallingEdges(); /// Get the outgoing call edge from this function which has the given return diff --git a/lldb/include/lldb/Target/MemoryTagMap.h b/lldb/include/lldb/Target/MemoryTagMap.h index acf3825bfb3f3..a2b4a3182464c 100644 --- a/lldb/include/lldb/Target/MemoryTagMap.h +++ b/lldb/include/lldb/Target/MemoryTagMap.h @@ -64,8 +64,8 @@ class MemoryTagMap { /// /// If the range had no tags at all, the vector will be empty. /// If some of the range was tagged it will have items and some - /// of them may be llvm::None. - /// (this saves the caller checking whether all items are llvm::None) + /// of them may be std::nullopt. + /// (this saves the caller checking whether all items are std::nullopt) std::vector<llvm::Optional<lldb::addr_t>> GetTags(lldb::addr_t addr, size_t len) const; @@ -77,7 +77,7 @@ class MemoryTagMap { /// to a granule boundary. /// /// \return - /// The tag for the granule that address refers to, or llvm::None + /// The tag for the granule that address refers to, or std::nullopt /// if it has no memory tag. llvm::Optional<lldb::addr_t> GetTag(lldb::addr_t addr) const; diff --git a/lldb/include/lldb/Target/PathMappingList.h b/lldb/include/lldb/Target/PathMappingList.h index 2f7ee535de3a7..1f1555a9ca648 100644 --- a/lldb/include/lldb/Target/PathMappingList.h +++ b/lldb/include/lldb/Target/PathMappingList.h @@ -81,8 +81,8 @@ class PathMappingList { /// \param[in] only_if_exists /// If \b true, besides matching \p path with the remapping rules, this /// tries to check with the filesystem that the remapped file exists. If - /// no valid file is found, \b None is returned. This might be expensive, - /// specially on a network. + /// no valid file is found, \b std::nullopt is returned. This might be + /// expensive, specially on a network. /// /// If \b false, then the existence of the returned remapping is not /// checked. @@ -104,8 +104,8 @@ class PathMappingList { /// The reversed mapped new path. /// /// \return - /// llvm::None if no remapping happens, otherwise, the matching source map - /// entry's ""to_new_pathto"" part (which is the prefix of \a file) is + /// std::nullopt if no remapping happens, otherwise, the matching source + /// map entry's ""to_new_pathto"" part (which is the prefix of \a file) is /// returned. llvm::Optional<llvm::StringRef> ReverseRemapPath(const FileSpec &file, FileSpec &fixed) const; diff --git a/lldb/include/lldb/Target/TraceCursor.h b/lldb/include/lldb/Target/TraceCursor.h index 3126c9fd6ac39..ee5014f375beb 100644 --- a/lldb/include/lldb/Target/TraceCursor.h +++ b/lldb/include/lldb/Target/TraceCursor.h @@ -259,8 +259,8 @@ class TraceCursor { /// whenever an eTraceEventHWClockTick event is fired. /// /// \return - /// The requested HW clock value, or \a llvm::None if this information is - /// not available for the current item. + /// The requested HW clock value, or \a std::nullopt if this information + /// is not available for the current item. virtual llvm::Optional<uint64_t> GetHWClock() const = 0; /// Get the approximate wall clock time in nanoseconds at which the current @@ -268,7 +268,7 @@ class TraceCursor { /// what time 0 means. /// /// \return - /// The approximate wall clock time for the trace item, or \a llvm::None + /// The approximate wall clock time for the trace item, or \a std::nullopt /// if not available. virtual llvm::Optional<double> GetWallClockTime() const = 0; diff --git a/lldb/include/lldb/Target/TraceDumper.h b/lldb/include/lldb/Target/TraceDumper.h index bc79705c6dd09..e5fdaaf2877e5 100644 --- a/lldb/include/lldb/Target/TraceDumper.h +++ b/lldb/include/lldb/Target/TraceDumper.h @@ -411,8 +411,8 @@ class TraceDumper { /// The number of instructions to print. /// /// \return - /// The instruction id of the last traversed instruction, or \b llvm::None - /// if no instructions were visited. + /// The instruction id of the last traversed instruction, or \b + /// std::nullopt if no instructions were visited. llvm::Optional<lldb::user_id_t> DumpInstructions(size_t count); /// Dump all function calls forwards chronologically and hierarchically diff --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h index d4f30bb40ecf0..3f0241216e51c 100644 --- a/lldb/include/lldb/Utility/FileSpec.h +++ b/lldb/include/lldb/Utility/FileSpec.h @@ -190,10 +190,10 @@ class FileSpec { static bool Match(const FileSpec &pattern, const FileSpec &file); /// Attempt to guess path style for a given path string. It returns a style, - /// if it was able to make a reasonable guess, or None if it wasn't. The guess - /// will be correct if the input path was a valid absolute path on the system - /// which produced it. On other paths the result of this function is - /// unreliable (e.g. "c:\foo.txt" is a valid relative posix path). + /// if it was able to make a reasonable guess, or std::nullopt if it wasn't. + /// The guess will be correct if the input path was a valid absolute path on + /// the system which produced it. On other paths the result of this function + /// is unreliable (e.g. "c:\foo.txt" is a valid relative posix path). static llvm::Optional<Style> GuessPathStyle(llvm::StringRef absolute_path); /// Case sensitivity of path. diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h index 86a3a392b348d..1c03ed13fa178 100644 --- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h +++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h @@ -208,7 +208,7 @@ class StringExtractorGDBRemote : public StringExtractor { static constexpr lldb::tid_t AllThreads = UINT64_MAX; // Read thread-id from the packet. If the packet is valid, returns - // the pair (PID, TID), otherwise returns llvm::None. If the packet + // the pair (PID, TID), otherwise returns std::nullopt. If the packet // does not list a PID, default_pid is used. llvm::Optional<std::pair<lldb::pid_t, lldb::tid_t>> GetPidTid(lldb::pid_t default_pid); diff --git a/lldb/include/lldb/Utility/Timeout.h b/lldb/include/lldb/Utility/Timeout.h index a873c4776f63a..1a9e595d7791f 100644 --- a/lldb/include/lldb/Utility/Timeout.h +++ b/lldb/include/lldb/Utility/Timeout.h @@ -21,7 +21,7 @@ namespace lldb_private { // from Timeout<std::milli> to Timeout<std::micro>. // // The intended meaning of the values is: -// - llvm::None - no timeout, the call should wait forever - 0 - poll, only +// - std::nullopt - no timeout, the call should wait forever - 0 - poll, only // complete the call if it will not block - >0 - wait for a given number of // units for the result template <typename Ratio> diff --git a/lldb/include/lldb/Utility/TraceGDBRemotePackets.h b/lldb/include/lldb/Utility/TraceGDBRemotePackets.h index c6d3f524d1d11..bfa68219ab4ef 100644 --- a/lldb/include/lldb/Utility/TraceGDBRemotePackets.h +++ b/lldb/include/lldb/Utility/TraceGDBRemotePackets.h @@ -44,7 +44,7 @@ struct TraceStartRequest { /// Tracing technology name, e.g. intel-pt, arm-coresight. std::string type; - /// If \a llvm::None, then this starts tracing the whole process. Otherwise, + /// If \a std::nullopt, then this starts tracing the whole process. Otherwise, /// only tracing for the specified threads is enabled. llvm::Optional<std::vector<lldb::tid_t>> tids; @@ -72,7 +72,7 @@ struct TraceStopRequest { /// Tracing technology name, e.g. intel-pt, arm-coresight. std::string type; - /// If \a llvm::None, then this stops tracing the whole process. Otherwise, + /// If \a std::nullopt, then this stops tracing the whole process. Otherwise, /// only tracing for the specified threads is stopped. llvm::Optional<std::vector<lldb::tid_t>> tids; }; diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 8457b78e1599c..91a52efec6000 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -56,7 +56,7 @@ class CommandPluginInterfaceImplementation : public CommandObjectParsed { bool IsRemovable() const override { return true; } /// More documentation is available in lldb::CommandObject::GetRepeatCommand, - /// but in short, if llvm::None is returned, the previous command will be + /// but in short, if std::nullopt is returned, the previous command will be /// repeated, and if an empty string is returned, no commands will be /// executed. llvm::Optional<std::string> GetRepeatCommand(Args ¤t_command_args, diff --git a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp index 59335951ecf84..3b6509bd8462f 100644 --- a/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp +++ b/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp @@ -200,7 +200,7 @@ void BreakpointResolverFileLine::DeduceSourceMapping( const llvm::StringRef path_separator = llvm::sys::path::get_separator( m_location_spec.GetFileSpec().GetPathStyle()); // Check if "b" is a suffix of "a". - // And return llvm::None if not or the new path + // And return std::nullopt if not or the new path // of "a" after consuming "b" from the back. auto check_suffix = [path_separator](llvm::StringRef a, llvm::StringRef b, diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp index 926d4af05f617..d28b524d966d1 100644 --- a/lldb/source/Expression/Materializer.cpp +++ b/lldb/source/Expression/Materializer.cpp @@ -773,7 +773,7 @@ class EntityVariableBase : public Materializer::Entity { /// Returns size in bytes of the type associated with this variable /// /// \returns On success, returns byte size of the type associated - /// with this variable. Returns NoneType otherwise. + /// with this variable. Returns std::nullopt otherwise. virtual llvm::Optional<uint64_t> GetByteSize(ExecutionContextScope *scope) const = 0; @@ -784,7 +784,7 @@ class EntityVariableBase : public Materializer::Entity { /// Returns alignment of the type associated with this variable in bits. /// /// \returns On success, returns alignment in bits for the type associated - /// with this variable. Returns NoneType otherwise. + /// with this variable. Returns std::nullopt otherwise. virtual llvm::Optional<size_t> GetTypeBitAlign(ExecutionContextScope *scope) const = 0; diff --git a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp index b49738623f48f..eae950df862b2 100644 --- a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp +++ b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp @@ -252,7 +252,7 @@ MapOpcodeIntoControlFlowKind(InstructionOpcodeAndModrm opcode_and_modrm) { /// Returns decoded instruction as struct InstructionOpcodeAndModrm, holding /// primary_opcode, opcode_len and modrm byte. Refer to the struct definition /// for more details. -/// Otherwise if the given instruction is invalid, returns None. +/// Otherwise if the given instruction is invalid, returns std::nullopt. llvm::Optional<InstructionOpcodeAndModrm> InstructionLengthDecode(const uint8_t *inst_bytes, int bytes_len, bool is_exec_mode_64b) { diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 2386946161dc8..511c6ff67cfad 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -874,7 +874,7 @@ class CodeComplete : public CodeCompleteConsumer { /// non-deterministic order, so this function should have no side effects. /// To make this easier to enforce, this function and all its parameters /// should always be const-qualified. - /// \return Returns llvm::None if no completion should be provided for the + /// \return Returns std::nullopt if no completion should be provided for the /// given CodeCompletionResult. llvm::Optional<CompletionWithPriority> getCompletionForResult(const CodeCompletionResult &R) const { diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp index 862c8f57b7ab4..d44864eb70400 100644 --- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp +++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp @@ -31,8 +31,8 @@ LLDB_PLUGIN_DEFINE_ADV(EmulateInstructionRISCV, InstructionRISCV) namespace lldb_private { -/// Returns all values wrapped in Optional, or None if any of the values is -/// None. +/// Returns all values wrapped in Optional, or std::nullopt if any of the values +/// is None. template <typename... Ts> static llvm::Optional<std::tuple<Ts...>> zipOpt(llvm::Optional<Ts> &&...ts) { if ((ts.has_value() && ...)) diff --git a/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp b/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp index 2051b5b1572b5..66ef90fa96a90 100644 --- a/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp +++ b/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp @@ -64,7 +64,7 @@ Error IntelPTCollector::TraceStop(const TraceStopRequest &request) { /// \return /// some file descriptor in /sys/fs/ associated with the cgroup of the given -/// pid, or \a llvm::None if the pid is not part of a cgroup. +/// pid, or \a std::nullopt if the pid is not part of a cgroup. static Optional<int> GetCGroupFileDescriptor(lldb::pid_t pid) { static Optional<int> fd; if (fd) diff --git a/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h b/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h index 38503b13230ab..b5b420335b438 100644 --- a/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h +++ b/lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h @@ -34,7 +34,7 @@ class IntelPTMultiCoreTrace : public IntelPTProcessTrace { /// /// \param[in] cgroup_fd /// A file descriptor in /sys/fs associated with the cgroup of the process to - /// trace. If not \a llvm::None, then the trace sesion will use cgroup + /// trace. If not \a std::nullopt, then the trace sesion will use cgroup /// filtering. /// /// \return diff --git a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h index 677038bf96039..a61e35b08c345 100644 --- a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h +++ b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h @@ -43,7 +43,7 @@ class IntelPTSingleBufferTrace { /// /// \param[in] cgroup_fd /// A file descriptor in /sys/fs associated with the cgroup of the process - /// to trace. If not \a llvm::None, then the trace sesion will use cgroup + /// to trace. If not \a std::nullopt, then the trace sesion will use cgroup /// filtering. /// /// \return diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h index e980f686958eb..7e5d7a6a7e9c2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h @@ -71,7 +71,7 @@ class DIERef { /// from that gets updated as data gets decoded. /// /// \return - /// Returns a valid DIERef if decoding succeeded, llvm::None if there was + /// Returns a valid DIERef if decoding succeeded, std::nullopt if there was /// unsufficient or invalid values that were decoded. static llvm::Optional<DIERef> Decode(const lldb_private::DataExtractor &data, lldb::offset_t *offset_ptr); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 880b5211491fb..bc23a53be8a7b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -3866,7 +3866,7 @@ CollectCallSiteParameters(ModuleSP module, DWARFDIE call_site_die) { const size_t num_attributes = child.GetAttributes(attributes); // Parse the location at index \p attr_index within this call site parameter - // DIE, or return None on failure. + // DIE, or return std::nullopt on failure. auto parse_simple_location = [&](int attr_index) -> llvm::Optional<DWARFExpressionList> { DWARFFormValue form_value; diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index 5e686751d7626..d84a1a66d3f6d 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -2273,7 +2273,7 @@ SymbolFileNativePDB::FindSymbolScope(PdbCompilandSymId id) { // If this exact symbol opens a scope, we can just directly access its // parent. id.offset = getScopeParentOffset(sym); - // Global symbols have parent offset of 0. Return llvm::None to indicate + // Global symbols have parent offset of 0. Return std::nullopt to indicate // this. if (id.offset == 0) return std::nullopt; diff --git a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h index 083184e4817c4..ffa1dcefb909b 100644 --- a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h +++ b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h @@ -121,7 +121,7 @@ namespace ParsingUtils { /// MB and MiB for 2^20 bytes; and B for bytes. A single integral number is /// considered bytes. /// \return -/// The converted number of bytes or \a llvm::None if the expression is +/// The converted number of bytes or \a std::nullopt if the expression is /// invalid. llvm::Optional<uint64_t> ParseUserFriendlySizeExpression(llvm::StringRef size_expression); diff --git a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h index bbe0fb9123e5a..d850217a789a4 100644 --- a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h +++ b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h @@ -188,7 +188,7 @@ class DecodedThread : public std::enable_shared_from_this<DecodedThread> { /// The trace item index to compare with. /// /// \return - /// The requested TSC range, or \a llvm::None if not available. + /// The requested TSC range, or \a std::nullopt if not available. llvm::Optional<DecodedThread::TSCRange> GetTSCRangeByIndex(uint64_t item_index) const; @@ -199,7 +199,7 @@ class DecodedThread : public std::enable_shared_from_this<DecodedThread> { /// The trace item index to compare with. /// /// \return - /// The requested nanoseconds range, or \a llvm::None if not available. + /// The requested nanoseconds range, or \a std::nullopt if not available. llvm::Optional<DecodedThread::NanosecondsRange> GetNanosecondsRangeByIndex(uint64_t item_index); diff --git a/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h b/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h index 8676a0b6d29e1..78fc2c7a96ea7 100644 --- a/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h +++ b/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.h @@ -111,7 +111,7 @@ SplitTraceIntoPSBBlock(TraceIntelPT &trace_intel_pt, /// Find the lowest TSC in the given trace. /// /// \return -/// The lowest TSC value in this trace if available, \a llvm::None if the +/// The lowest TSC value in this trace if available, \a std::nullopt if the /// trace is empty or the trace contains no timing information, or an \a /// llvm::Error if it was not possible to set up the decoder. llvm::Expected<llvm::Optional<uint64_t>> diff --git a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h index ad7c124d301bc..74b40c065c963 100644 --- a/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h +++ b/lldb/source/Plugins/Trace/intel-pt/ThreadDecoder.h @@ -36,9 +36,9 @@ class ThreadDecoder { llvm::Expected<DecodedThreadSP> Decode(); /// \return - /// The lowest TSC value in this trace if available, \a llvm::None if the - /// trace is empty or the trace contains no timing information, or an \a - /// llvm::Error if it was not possible to set up the decoder. + /// The lowest TSC value in this trace if available, \a std::nullopt if + /// the trace is empty or the trace contains no timing information, or an + /// \a llvm::Error if it was not possible to set up the decoder. llvm::Expected<llvm::Optional<uint64_t>> FindLowestTSC(); ThreadDecoder(const ThreadDecoder &other) = delete; diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h index f6711832226e4..611d996fc8090 100644 --- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h +++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h @@ -249,7 +249,7 @@ class TraceIntelPT : public Trace { /// \return /// The lowest timestamp in nanoseconds in all traces if available, \a - /// llvm::None if all the traces were empty or no trace contained no + /// std::nullopt if all the traces were empty or no trace contained no /// timing information, or an \a llvm::Error if it was not possible to set /// up the decoder for some trace. llvm::Expected<llvm::Optional<uint64_t>> FindBeginningOfTimeNanos(); diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h index 87c370e88ae6c..00657abe4bd0f 100644 --- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h +++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTMultiCpuDecoder.h @@ -67,9 +67,9 @@ class TraceIntelPTMultiCpuDecoder { size_t GetTotalPSBBlocksCount() const; /// \return - /// The lowest TSC value in this trace if available, \a llvm::None if the - /// trace is empty or the trace contains no timing information, or an \a - /// llvm::Error if it was not possible to set up the decoder. + /// The lowest TSC value in this trace if available, \a std::nullopt if + /// the trace is empty or the trace contains no timing information, or an + /// \a llvm::Error if it was not possible to set up the decoder. llvm::Expected<llvm::Optional<uint64_t>> FindLowestTSC(); private: diff --git a/lldb/source/Target/MemoryTagMap.cpp b/lldb/source/Target/MemoryTagMap.cpp index 4fe5c8b2b3386..8eff42dce01b0 100644 --- a/lldb/source/Target/MemoryTagMap.cpp +++ b/lldb/source/Target/MemoryTagMap.cpp @@ -47,7 +47,7 @@ MemoryTagMap::GetTags(lldb::addr_t addr, size_t len) const { got_valid_tags = true; } - // To save the caller checking if every item is llvm::None, + // To save the caller checking if every item is std::nullopt, // we return an empty vector if we got no tags at all. if (got_valid_tags) return tags; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits