[lldb] Use std::nullopt instead of None (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 5 Dec 2022 00:51:25 +0000 (16:51 -0800)
committerKazu Hirata <kazu@google.com>
Mon, 5 Dec 2022 00:51:25 +0000 (16:51 -0800)
commit343523d040d1ede65a35d8a6d514b0f7c198a3f2
tree315214eb1475196d988f6dde049cf93afd5327dc
parent5fa43db46ef9f05400e4fb4d9d8e5fb1781eeae5
[lldb] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

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
134 files changed:
lldb/include/lldb/Breakpoint/BreakpointResolver.h
lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
lldb/include/lldb/Core/DataFileCache.h
lldb/include/lldb/Core/Debugger.h
lldb/include/lldb/Core/SourceLocationSpec.h
lldb/include/lldb/Host/File.h
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/include/lldb/Interpreter/CommandObject.h
lldb/include/lldb/Interpreter/ScriptedProcessInterface.h
lldb/include/lldb/Symbol/TypeSystem.h
lldb/include/lldb/Target/LanguageRuntime.h
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Target.h
lldb/include/lldb/Target/TraceDumper.h
lldb/include/lldb/Utility/Event.h
lldb/include/lldb/Utility/Predicate.h
lldb/include/lldb/Utility/Timeout.h
lldb/source/API/SBCommandInterpreter.cpp
lldb/source/API/SBCommunication.cpp
lldb/source/API/SBExpressionOptions.cpp
lldb/source/API/SBListener.cpp
lldb/source/API/SBPlatform.cpp
lldb/source/API/SBThread.cpp
lldb/source/Breakpoint/BreakpointID.cpp
lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectMultiword.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectWatchpoint.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/DumpDataExtractor.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Core/Module.cpp
lldb/source/Core/SourceLocationSpec.cpp
lldb/source/Core/ThreadedCommunication.cpp
lldb/source/Expression/IRExecutionUnit.cpp
lldb/source/Host/common/Editline.cpp
lldb/source/Host/common/File.cpp
lldb/source/Host/common/HostInfoBase.cpp
lldb/source/Host/common/NativeProcessProtocol.cpp
lldb/source/Host/common/Terminal.cpp
lldb/source/Host/linux/Host.cpp
lldb/source/Host/linux/HostInfoLinux.cpp
lldb/source/Host/posix/HostInfoPosix.cpp
lldb/source/Interpreter/CommandHistory.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Interpreter/ScriptInterpreter.cpp
lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp
lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
lldb/source/Plugins/ObjectContainer/Mach-O-Fileset/ObjectContainerMachOFileset.cpp
lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp
lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/source/Plugins/ObjectFile/wasm/ObjectFileWasm.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp
lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.cpp
lldb/source/Plugins/Process/Linux/IntelPTMultiCoreTrace.h
lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.h
lldb/source/Plugins/Process/Linux/IntelPTThreadTraceCollection.cpp
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
lldb/source/Plugins/Process/Linux/Perf.cpp
lldb/source/Plugins/Process/Linux/Perf.h
lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
lldb/source/Plugins/Process/Utility/AuxVector.cpp
lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
lldb/source/Plugins/Process/elf-core/RegisterUtilities.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
lldb/source/Plugins/SymbolFile/DWARF/DIERef.cpp
lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp
lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
lldb/source/Symbol/CompileUnit.cpp
lldb/source/Symbol/CompilerType.cpp
lldb/source/Symbol/DWARFCallFrameInfo.cpp
lldb/source/Symbol/Function.cpp
lldb/source/Symbol/PostfixExpression.cpp
lldb/source/Symbol/SymbolFileOnDemand.cpp
lldb/source/Symbol/TypeSystem.cpp
lldb/source/Symbol/UnwindPlan.cpp
lldb/source/Symbol/UnwindTable.cpp
lldb/source/Target/MemoryTagMap.cpp
lldb/source/Target/PathMappingList.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/ProcessTrace.cpp
lldb/source/Target/RemoteAwarePlatform.cpp
lldb/source/Target/Statistics.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/Trace.cpp
lldb/source/Target/TraceDumper.cpp
lldb/source/Utility/FileSpec.cpp
lldb/source/Utility/StringExtractorGDBRemote.cpp
lldb/source/Utility/UriParser.cpp
lldb/source/Utility/UserIDResolver.cpp
lldb/tools/lldb-server/lldb-platform.cpp
lldb/tools/lldb-vscode/JSONUtils.h
lldb/tools/lldb-vscode/ProgressEvent.cpp