[Lldb-commits] [lldb] 1e56f7a - [lldb] clang-format PathMappingList.cpp

2023-01-07 Thread Kazu Hirata via lldb-commits

Author: Kazu Hirata
Date: 2023-01-07T09:38:44-08:00
New Revision: 1e56f7a064099a36ddb8c7930de78fdbaab1f6cc

URL: 
https://github.com/llvm/llvm-project/commit/1e56f7a064099a36ddb8c7930de78fdbaab1f6cc
DIFF: 
https://github.com/llvm/llvm-project/commit/1e56f7a064099a36ddb8c7930de78fdbaab1f6cc.diff

LOG: [lldb] clang-format PathMappingList.cpp

This patch clang-formats AppendPathComponents in PathMappingList.cpp.

Without this patch, clang-format would indent the body of the
following function by four spaces.

Added: 


Modified: 
lldb/source/Target/PathMappingList.cpp

Removed: 




diff  --git a/lldb/source/Target/PathMappingList.cpp 
b/lldb/source/Target/PathMappingList.cpp
index 61a4841fbe5f4..82bba8a4b1f97 100644
--- a/lldb/source/Target/PathMappingList.cpp
+++ b/lldb/source/Target/PathMappingList.cpp
@@ -174,13 +174,13 @@ bool PathMappingList::RemapPath(ConstString path,
 /// Append components to path, applying style.
 static void AppendPathComponents(FileSpec &path, llvm::StringRef components,
  llvm::sys::path::Style style) {
-auto component = llvm::sys::path::begin(components, style);
-auto e = llvm::sys::path::end(components);
-while (component != e &&
-llvm::sys::path::is_separator(*component->data(), style))
-  ++component;
-for (; component != e; ++component)
-  path.AppendPathComponent(*component);
+  auto component = llvm::sys::path::begin(components, style);
+  auto e = llvm::sys::path::end(components);
+  while (component != e &&
+ llvm::sys::path::is_separator(*component->data(), style))
+++component;
+  for (; component != e; ++component)
+path.AppendPathComponent(*component);
 }
 
 llvm::Optional



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 570117b - [lldb] Remove remaining uses of llvm::Optional (NFC)

2023-01-07 Thread Kazu Hirata via lldb-commits

Author: Kazu Hirata
Date: 2023-01-07T14:36:35-08:00
New Revision: 570117b6a5c8d1bd4e611aa3087794c215753ab7

URL: 
https://github.com/llvm/llvm-project/commit/570117b6a5c8d1bd4e611aa3087794c215753ab7
DIFF: 
https://github.com/llvm/llvm-project/commit/570117b6a5c8d1bd4e611aa3087794c215753ab7.diff

LOG: [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

Added: 


Modified: 
lldb/include/lldb/Breakpoint/BreakpointID.h
lldb/include/lldb/Core/SourceLocationSpec.h
lldb/include/lldb/Core/ValueObject.h
lldb/include/lldb/Core/ValueObjectChild.h
lldb/include/lldb/Host/FileSystem.h
lldb/include/lldb/Host/linux/Host.h
lldb/include/lldb/Symbol/ObjectFile.h
lldb/include/lldb/Target/MemoryRegionInfo.h
lldb/include/lldb/Target/MemoryTagMap.h
lldb/include/lldb/Target/UnixSignals.h
lldb/include/lldb/Utility/Diagnostics.h
lldb/include/lldb/Utility/SelectHelper.h
lldb/include/lldb/Utility/Timeout.h
lldb/include/lldb/Utility/UriParser.h
lldb/include/lldb/Utility/UserIDResolver.h
lldb/source/Core/DumpDataExtractor.cpp
lldb/source/Core/IOHandler.cpp
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Plugins/ABI/ARC/ABISysV_arc.h
lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.h
lldb/source/Plugins/Instruction/RISCV/RISCVInstructions.h
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.h
lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h

lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h
lldb/source/Plugins/Process/minidump/MinidumpParser.h
lldb/source/Plugins/Process/minidump/MinidumpTypes.h
lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h
lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTJSONStructs.h
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
lldb/source/Utility/SelectHelper.cpp
lldb/tools/lldb-vscode/JSONUtils.cpp
lldb/unittests/DataFormatter/StringPrinterTests.cpp
lldb/unittests/Process/minidump/MinidumpParserTest.cpp
lldb/unittests/tools/lldb-server/tests/TestClient.h

Removed: 




diff  --git a/lldb/include/lldb/Breakpoint/BreakpointID.h 
b/lldb/include/lldb/Breakpoint/BreakpointID.h
index dff901163cb0..a62323061b75 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 3550dc02f654..9c2512bff4b7 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 398c6e914cbb..a666d0bab173 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 a655911bf7bd..07b37aa8a405 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/incl