[Lldb-commits] [lldb] [lldb] Skip remote PutFile when MD5 hashes equal (PR #88812)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 16 10:47:49 PDT 2024


================
@@ -1197,6 +1197,34 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
   if (!source_file)
     return Status(source_file.takeError());
   Status error;
+
+  bool requires_upload = true;
+  {
----------------
bulbazord wrote:

I see. I wouldn't say it's a bad thing to create a new scope if you want to contain the lifetime of these variables to their own scope, but in LLDB (and more broadly LLVM) this is mostly used for RAII. The most common instance of this is when one wants to acquire a lock but does not want the lock to span the lifetime of the method body.

For consistency I would say either put this code in the main body, put it in a small static function, or put it in a lambda.

https://github.com/llvm/llvm-project/pull/88812


More information about the lldb-commits mailing list