From 570117b6a5c8d1bd4e611aa3087794c215753ab7 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 7 Jan 2023 14:36:35 -0800 Subject: [PATCH] [lldb] Remove remaining uses of llvm::Optional (NFC) This patch removes the unused "using" declarations, updates comments, and removes #include "llvm/ADT/Optional.h". 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 --- lldb/include/lldb/Breakpoint/BreakpointID.h | 1 - lldb/include/lldb/Core/SourceLocationSpec.h | 1 - lldb/include/lldb/Core/ValueObject.h | 1 - lldb/include/lldb/Core/ValueObjectChild.h | 2 -- lldb/include/lldb/Host/FileSystem.h | 1 - lldb/include/lldb/Host/linux/Host.h | 1 - lldb/include/lldb/Symbol/ObjectFile.h | 1 - lldb/include/lldb/Target/MemoryRegionInfo.h | 1 - lldb/include/lldb/Target/MemoryTagMap.h | 1 - lldb/include/lldb/Target/UnixSignals.h | 1 - lldb/include/lldb/Utility/Diagnostics.h | 1 - lldb/include/lldb/Utility/SelectHelper.h | 1 - lldb/include/lldb/Utility/Timeout.h | 1 - lldb/include/lldb/Utility/UriParser.h | 1 - lldb/include/lldb/Utility/UserIDResolver.h | 1 - lldb/source/Core/DumpDataExtractor.cpp | 1 - lldb/source/Core/IOHandler.cpp | 1 - lldb/source/Expression/DWARFExpression.cpp | 2 +- lldb/source/Plugins/ABI/ARC/ABISysV_arc.h | 1 - lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h | 1 - lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h | 1 - lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp | 1 - lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h | 1 - lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp | 1 - .../Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h | 1 - lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h | 1 - lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h | 1 - lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h | 1 - .../Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h | 1 - lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h | 1 - .../Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h | 1 - lldb/source/Plugins/Process/minidump/MinidumpParser.h | 1 - lldb/source/Plugins/Process/minidump/MinidumpTypes.h | 1 - lldb/source/Plugins/SymbolFile/DWARF/DIERef.h | 1 - lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h | 1 - lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h | 1 - lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 1 - lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h | 1 - lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h | 1 - lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h | 1 - lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h | 1 - lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h | 2 +- lldb/source/Utility/SelectHelper.cpp | 1 - lldb/tools/lldb-vscode/JSONUtils.cpp | 1 - lldb/unittests/DataFormatter/StringPrinterTests.cpp | 2 -- lldb/unittests/Process/minidump/MinidumpParserTest.cpp | 1 - lldb/unittests/tools/lldb-server/tests/TestClient.h | 1 - 47 files changed, 2 insertions(+), 49 deletions(-) diff --git a/lldb/include/lldb/Breakpoint/BreakpointID.h b/lldb/include/lldb/Breakpoint/BreakpointID.h index dff9011..a623230 100644 --- a/lldb/include/lldb/Breakpoint/BreakpointID.h +++ b/lldb/include/lldb/Breakpoint/BreakpointID.h @@ -12,7 +12,6 @@ #include "lldb/lldb-private.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include diff --git a/lldb/include/lldb/Core/SourceLocationSpec.h b/lldb/include/lldb/Core/SourceLocationSpec.h index 3550dc0..9c2512b 100644 --- a/lldb/include/lldb/Core/SourceLocationSpec.h +++ b/lldb/include/lldb/Core/SourceLocationSpec.h @@ -11,7 +11,6 @@ #include "lldb/Core/Declaration.h" #include "lldb/lldb-defines.h" -#include "llvm/ADT/Optional.h" #include #include diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 398c6e9..a666d0b 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -26,7 +26,6 @@ #include "lldb/lldb-types.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/Core/ValueObjectChild.h index a655911..07b37aa 100644 --- a/lldb/include/lldb/Core/ValueObjectChild.h +++ b/lldb/include/lldb/Core/ValueObjectChild.h @@ -18,8 +18,6 @@ #include "lldb/lldb-private-enumerations.h" #include "lldb/lldb-types.h" -#include "llvm/ADT/Optional.h" - #include #include #include diff --git a/lldb/include/lldb/Host/FileSystem.h b/lldb/include/lldb/Host/FileSystem.h index aefad00..823e771 100644 --- a/lldb/include/lldb/Host/FileSystem.h +++ b/lldb/include/lldb/Host/FileSystem.h @@ -14,7 +14,6 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Status.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/VirtualFileSystem.h" diff --git a/lldb/include/lldb/Host/linux/Host.h b/lldb/include/lldb/Host/linux/Host.h index 08ac41b..ef1e74c 100644 --- a/lldb/include/lldb/Host/linux/Host.h +++ b/lldb/include/lldb/Host/linux/Host.h @@ -10,7 +10,6 @@ #define LLDB_HOST_LINUX_HOST_H #include "lldb/lldb-types.h" -#include "llvm/ADT/Optional.h" #include namespace lldb_private { diff --git a/lldb/include/lldb/Symbol/ObjectFile.h b/lldb/include/lldb/Symbol/ObjectFile.h index bae6e72..4d6c8f1 100644 --- a/lldb/include/lldb/Symbol/ObjectFile.h +++ b/lldb/include/lldb/Symbol/ObjectFile.h @@ -19,7 +19,6 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/UUID.h" #include "lldb/lldb-private.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/Threading.h" #include "llvm/Support/VersionTuple.h" #include diff --git a/lldb/include/lldb/Target/MemoryRegionInfo.h b/lldb/include/lldb/Target/MemoryRegionInfo.h index 8d639a8..47d4c9d6 100644 --- a/lldb/include/lldb/Target/MemoryRegionInfo.h +++ b/lldb/include/lldb/Target/MemoryRegionInfo.h @@ -15,7 +15,6 @@ #include "lldb/Utility/ConstString.h" #include "lldb/Utility/RangeMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/FormatProviders.h" namespace lldb_private { diff --git a/lldb/include/lldb/Target/MemoryTagMap.h b/lldb/include/lldb/Target/MemoryTagMap.h index 00543bb..272f722 100644 --- a/lldb/include/lldb/Target/MemoryTagMap.h +++ b/lldb/include/lldb/Target/MemoryTagMap.h @@ -11,7 +11,6 @@ #include "lldb/Target/MemoryTagManager.h" #include "lldb/lldb-private.h" -#include "llvm/ADT/Optional.h" #include #include diff --git a/lldb/include/lldb/Target/UnixSignals.h b/lldb/include/lldb/Target/UnixSignals.h index c996723..ff9f1ac 100644 --- a/lldb/include/lldb/Target/UnixSignals.h +++ b/lldb/include/lldb/Target/UnixSignals.h @@ -16,7 +16,6 @@ #include "lldb/Utility/ConstString.h" #include "lldb/lldb-private.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/JSON.h" namespace lldb_private { diff --git a/lldb/include/lldb/Utility/Diagnostics.h b/lldb/include/lldb/Utility/Diagnostics.h index 225346a..5d23fa8 100644 --- a/lldb/include/lldb/Utility/Diagnostics.h +++ b/lldb/include/lldb/Utility/Diagnostics.h @@ -11,7 +11,6 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Log.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/Error.h" diff --git a/lldb/include/lldb/Utility/SelectHelper.h b/lldb/include/lldb/Utility/SelectHelper.h index c1263f7..ea46c33 100644 --- a/lldb/include/lldb/Utility/SelectHelper.h +++ b/lldb/include/lldb/Utility/SelectHelper.h @@ -13,7 +13,6 @@ #include "lldb/lldb-types.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include #include diff --git a/lldb/include/lldb/Utility/Timeout.h b/lldb/include/lldb/Utility/Timeout.h index 3f7744e..85128c5 100644 --- a/lldb/include/lldb/Utility/Timeout.h +++ b/lldb/include/lldb/Utility/Timeout.h @@ -9,7 +9,6 @@ #ifndef LLDB_UTILITY_TIMEOUT_H #define LLDB_UTILITY_TIMEOUT_H -#include "llvm/ADT/Optional.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/FormatProviders.h" #include diff --git a/lldb/include/lldb/Utility/UriParser.h b/lldb/include/lldb/Utility/UriParser.h index b109221..311cff9 100644 --- a/lldb/include/lldb/Utility/UriParser.h +++ b/lldb/include/lldb/Utility/UriParser.h @@ -9,7 +9,6 @@ #ifndef LLDB_UTILITY_URIPARSER_H #define LLDB_UTILITY_URIPARSER_H -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include diff --git a/lldb/include/lldb/Utility/UserIDResolver.h b/lldb/include/lldb/Utility/UserIDResolver.h index e9f5836..45dad6b 100644 --- a/lldb/include/lldb/Utility/UserIDResolver.h +++ b/lldb/include/lldb/Utility/UserIDResolver.h @@ -10,7 +10,6 @@ #define LLDB_UTILITY_USERIDRESOLVER_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include #include diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index 17025ef..7f6108f 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -30,7 +30,6 @@ #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 443ca86..95957b6 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -50,7 +50,6 @@ using namespace lldb; using namespace lldb_private; -using llvm::Optional; using llvm::StringRef; IOHandler::IOHandler(Debugger &debugger, IOHandler::Type type) diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 682ead9..47cef1b 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -799,7 +799,7 @@ void UpdateValueTypeFromLocationDescription(Log *log, const DWARFUnit *dwarf_cu, /// \param so_addr out parameter, will be set to load address or section offset /// \param check_sectionoffset bool which determines if having a section offset /// but not a load address is considerd a success -/// \returns llvm::Optional containing the load address if resolving and getting +/// \returns std::optional containing the load address if resolving and getting /// the load address succeed or an empty Optinal otherwise. If /// check_sectionoffset is true we consider LLDB_INVALID_ADDRESS a /// success if so_addr.IsSectionOffset() is true. diff --git a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.h b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.h index d5358c1..de51345 100644 --- a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.h +++ b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.h @@ -10,7 +10,6 @@ #define liblldb_ABISysV_arc_h_ // Other libraries and framework includes -#include #include // Project includes diff --git a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h index 6104e40..68ae3a3 100644 --- a/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h +++ b/lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h @@ -17,7 +17,6 @@ #include "lldb/Core/Address.h" #include "lldb/Core/Disassembler.h" #include "lldb/Core/PluginManager.h" -#include "llvm/ADT/Optional.h" class InstructionLLVMC; diff --git a/lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h b/lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h index d9c2ffb..252cef8 100644 --- a/lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h +++ b/lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h @@ -14,7 +14,6 @@ #include #include "llvm/ADT/APFloat.h" -#include "llvm/ADT/Optional.h" namespace lldb_private { diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp index a835f81..617181a 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp @@ -16,7 +16,6 @@ using namespace lldb; using namespace lldb_private; -using llvm::Optional; using ParsedFunction = lldb_private::CPlusPlusNameParser::ParsedFunction; using ParsedName = lldb_private::CPlusPlusNameParser::ParsedName; namespace tok = clang::tok; diff --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h index 77482f6..326efb7 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h +++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h @@ -10,7 +10,6 @@ #define LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_CPLUSPLUSNAMEPARSER_H #include "clang/Lex/Lexer.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp index e4956b3..4e54e7b 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp @@ -12,7 +12,6 @@ #include "lldb/Symbol/CompilerType.h" #include "lldb/Utility/LLDBAssert.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/ScopeExit.h" #include diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h index 4c456dd..cfeec3d6 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h @@ -9,7 +9,6 @@ #ifndef LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCRUNTIME_H #define LLDB_SOURCE_PLUGINS_LANGUAGERUNTIME_OBJC_APPLEOBJCRUNTIME_APPLEOBJCRUNTIME_H -#include "llvm/ADT/Optional.h" #include "AppleObjCTrampolineHandler.h" #include "AppleThreadPlanStepThroughObjCTrampoline.h" diff --git a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h index 0281196..e68f0a4 100644 --- a/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h +++ b/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h @@ -15,7 +15,6 @@ #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h" -#include "llvm/ADT/Optional.h" #include "AdbClient.h" diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h index eed8611..e5b75fd 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h @@ -17,7 +17,6 @@ #include "lldb/Utility/Status.h" #include "lldb/Utility/XcodeSDK.h" #include "lldb/lldb-forward.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h index 393d99f..4b564bb 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h @@ -20,7 +20,6 @@ #include "lldb/Utility/StructuredData.h" #include "lldb/Utility/XcodeSDK.h" #include "lldb/lldb-forward.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" diff --git a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h index 05d946f..1889be6 100644 --- a/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h +++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h @@ -25,7 +25,6 @@ typedef void *id; #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Status.h" -#include "llvm/ADT/Optional.h" // And now the actual magic namespace CoreSimulatorSupport { diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h index d3b0344..45ea2f2 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h @@ -29,7 +29,6 @@ #include "lldb/Host/windows/PosixApi.h" #endif -#include "llvm/ADT/Optional.h" #include "llvm/Support/VersionTuple.h" namespace lldb_private { diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h index 97805f2..18530254 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h @@ -17,7 +17,6 @@ #include "GDBRemoteCommunicationServerCommon.h" #include "lldb/Host/Socket.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/Error.h" namespace lldb_private { diff --git a/lldb/source/Plugins/Process/minidump/MinidumpParser.h b/lldb/source/Plugins/Process/minidump/MinidumpParser.h index 0831314..050ba08 100644 --- a/lldb/source/Plugins/Process/minidump/MinidumpParser.h +++ b/lldb/source/Plugins/Process/minidump/MinidumpParser.h @@ -19,7 +19,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include "llvm/Object/Minidump.h" diff --git a/lldb/source/Plugins/Process/minidump/MinidumpTypes.h b/lldb/source/Plugins/Process/minidump/MinidumpTypes.h index 8c80a8c..fe99abf 100644 --- a/lldb/source/Plugins/Process/minidump/MinidumpTypes.h +++ b/lldb/source/Plugins/Process/minidump/MinidumpTypes.h @@ -13,7 +13,6 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/BitmaskEnum.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/BinaryFormat/Minidump.h" diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h index 72238e3..af7e5e9 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h @@ -10,7 +10,6 @@ #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DIEREF_H #include "lldb/Core/dwarf.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/FormatProviders.h" #include #include diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h index cc5168c..7df776b 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h @@ -11,7 +11,6 @@ #include "DWARFDataExtractor.h" #include "lldb/Core/Section.h" -#include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/DWARF/DWARFContext.h" #include "llvm/Support/Threading.h" #include diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h index 3cbfda4..90e07ea 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h @@ -10,7 +10,6 @@ #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFFORMVALUE_H #include "DWARFDataExtractor.h" -#include "llvm/ADT/Optional.h" #include #include diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 4efa2c1..426e6b9 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -8,7 +8,6 @@ #include "SymbolFileDWARF.h" -#include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Threading.h" diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h b/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h index ef9110b..c6e382d 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h +++ b/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h @@ -13,7 +13,6 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/IntervalMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/CodeView/DebugInlineeLinesSubsection.h" #include "llvm/DebugInfo/CodeView/StringsAndChecksums.h" #include "llvm/DebugInfo/CodeView/SymbolRecord.h" diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h index 57d6822..796aa4c 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h +++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h @@ -11,7 +11,6 @@ #include "lldb/lldb-types.h" #include "llvm/ADT/IntervalMap.h" -#include "llvm/ADT/Optional.h" #include "llvm/DebugInfo/PDB/Native/PDBFile.h" #include "llvm/DebugInfo/PDB/PDBTypes.h" diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h index 303a112..e1a35c6 100644 --- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h +++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h @@ -11,7 +11,6 @@ #include "lldb/lldb-types.h" #include -#include #include namespace lldb_private { diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h index 3f6fcd2..93156aa 100644 --- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h +++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h @@ -11,7 +11,6 @@ #include "lldb/Utility/TraceIntelPTGDBRemotePackets.h" #include "lldb/lldb-types.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/JSON.h" #include #include diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h index 2f30b56..74daecb 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -1159,7 +1159,7 @@ public: }; /// Alias for requesting the default scratch TypeSystemClang in GetForTarget. - // This isn't constexpr as gtest/llvm::Optional comparison logic is trying + // This isn't constexpr as gtest/std::optional comparison logic is trying // to get the address of this for pretty-printing. static const std::nullopt_t DefaultAST; diff --git a/lldb/source/Utility/SelectHelper.cpp b/lldb/source/Utility/SelectHelper.cpp index a6032a3..b7d9e19 100644 --- a/lldb/source/Utility/SelectHelper.cpp +++ b/lldb/source/Utility/SelectHelper.cpp @@ -20,7 +20,6 @@ #include "lldb/lldb-types.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" #include #include diff --git a/lldb/tools/lldb-vscode/JSONUtils.cpp b/lldb/tools/lldb-vscode/JSONUtils.cpp index 82f5911..8ec38a4 100644 --- a/lldb/tools/lldb-vscode/JSONUtils.cpp +++ b/lldb/tools/lldb-vscode/JSONUtils.cpp @@ -12,7 +12,6 @@ #include #include -#include "llvm/ADT/Optional.h" #include "llvm/Support/FormatAdapters.h" #include "llvm/Support/Path.h" #include "llvm/Support/ScopedPrinter.h" diff --git a/lldb/unittests/DataFormatter/StringPrinterTests.cpp b/lldb/unittests/DataFormatter/StringPrinterTests.cpp index 5badd82..ac41161 100644 --- a/lldb/unittests/DataFormatter/StringPrinterTests.cpp +++ b/lldb/unittests/DataFormatter/StringPrinterTests.cpp @@ -10,7 +10,6 @@ #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/Endian.h" #include "lldb/Utility/StreamString.h" -#include "llvm/ADT/Optional.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/raw_ostream.h" #include "gtest/gtest.h" @@ -20,7 +19,6 @@ using namespace lldb; using namespace lldb_private; using lldb_private::formatters::StringPrinter; -using llvm::Optional; using llvm::StringRef; #define QUOTE(x) std::string("\"" x "\"") diff --git a/lldb/unittests/Process/minidump/MinidumpParserTest.cpp b/lldb/unittests/Process/minidump/MinidumpParserTest.cpp index eded318..632a7fd 100644 --- a/lldb/unittests/Process/minidump/MinidumpParserTest.cpp +++ b/lldb/unittests/Process/minidump/MinidumpParserTest.cpp @@ -19,7 +19,6 @@ #include "lldb/Utility/DataExtractor.h" #include "lldb/Utility/FileSpec.h" #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" #include "llvm/ObjectYAML/yaml2obj.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.h b/lldb/unittests/tools/lldb-server/tests/TestClient.h index 09d7131..9a1831d 100644 --- a/lldb/unittests/tools/lldb-server/tests/TestClient.h +++ b/lldb/unittests/tools/lldb-server/tests/TestClient.h @@ -14,7 +14,6 @@ #include "lldb/Host/ProcessLaunchInfo.h" #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/Connection.h" -#include "llvm/ADT/Optional.h" #include "llvm/Support/Casting.h" #include "llvm/Support/FormatVariadic.h" #include -- 2.7.4