=?utf-8?q?José?= L. Junior <josejun...@10xengineers.ai>,taalhaataahir0102
 <23100...@lums.edu.pk>,taalhaataahir0102 
<23100...@lums.edu.pk>,taalhaataahir0102
 <23100...@lums.edu.pk>,taalhaataahir0102 <23100...@lums.edu.pk>,
=?utf-8?q?José?= L. Junior <josejun...@10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejun...@10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejun...@10xengineers.ai>,
=?utf-8?q?José?= L. Junior <josejun...@10xengineers.ai>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/69...@github.com>


================
@@ -246,8 +246,8 @@ class Address {
   /// \see Address::DumpStyle
   bool Dump(Stream *s, ExecutionContextScope *exe_scope, DumpStyle style,
             DumpStyle fallback_style = DumpStyleInvalid,
-            uint32_t addr_byte_size = UINT32_MAX,
-            bool all_ranges = false) const;
+            uint32_t addr_byte_size = UINT32_MAX, bool all_ranges = false,
+            const char *pattern = nullptr) const;
----------------
DavidSpickett wrote:

>When we use std::move(regex2) to pass it to test_func3, it's essentially 
>moved, and after the move, the regex2 in LookupSymbolInModule becomes garbage.

This is where I get on my Rust powered soapbox and preach about C++ move not 
being what you'd think it is. :)

Good research anyway. Sound like it's what I suspected is that the regex is 
carrying around the match "engine"'s state.

On the struct, yes, the struct itself would be optional. If you do pass an 
instance of it you must provide all 3.

To be honest, once we're packing all this into a struct, that's quite an 
obvious signal to the programmer that this is no ordinary string. So you could 
do just try the struct idea without using the `Regex` type.

And ok, it's not perfect because all 3 struct members have the same type still, 
but if making the pattern a `Regex` is this much trouble it's probably not 
worth it.

https://github.com/llvm/llvm-project/pull/69422
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to