[all-commits] [llvm/llvm-project] 343523: [lldb] Use std::nullopt instead of None (NFC)

kazutakahirata via All-commits all-commits at lists.llvm.org
Sun Dec 4 16:51:43 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 343523d040d1ede65a35d8a6d514b0f7c198a3f2
      https://github.com/llvm/llvm-project/commit/343523d040d1ede65a35d8a6d514b0f7c198a3f2
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-04 (Sun, 04 Dec 2022)

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

  Log Message:
  -----------
  [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


  Commit: d2a6114f27016065f6c7e7d39c0412e7d8d5e03b
      https://github.com/llvm/llvm-project/commit/d2a6114f27016065f6c7e7d39c0412e7d8d5e03b
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-04 (Sun, 04 Dec 2022)

  Changed paths:
    M lldb/unittests/Core/SourceLocationSpecTest.cpp
    M lldb/unittests/DataFormatter/StringPrinterTests.cpp
    M lldb/unittests/Host/SocketTest.cpp
    M lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp
    M lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
    M lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
    M lldb/unittests/Process/minidump/MinidumpParserTest.cpp
    M lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
    M lldb/unittests/Signals/UnixSignalsTest.cpp
    M lldb/unittests/Symbol/TestLineEntry.cpp
    M lldb/unittests/Symbol/TestTypeSystemClang.cpp
    M lldb/unittests/SymbolFile/DWARF/DWARFIndexCachingTest.cpp
    M lldb/unittests/Target/MemoryTagMapTest.cpp
    M lldb/unittests/Utility/FileSpecTest.cpp
    M lldb/unittests/Utility/ListenerTest.cpp
    M lldb/unittests/Utility/PredicateTest.cpp
    M lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
    M lldb/unittests/Utility/RegisterValueTest.cpp
    M lldb/unittests/Utility/StringExtractorGDBRemoteTest.cpp
    M lldb/unittests/Utility/TimeoutTest.cpp
    M lldb/unittests/Utility/UriParserTest.cpp
    M lldb/unittests/Utility/UserIDResolverTest.cpp
    M lldb/unittests/tools/lldb-server/tests/TestClient.cpp

  Log Message:
  -----------
  [lldb/unittests] 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


Compare: https://github.com/llvm/llvm-project/compare/5fa43db46ef9...d2a6114f2701


More information about the All-commits mailing list