================
@@ -684,14 +687,17 @@ bool IRForTarget::RewriteObjCConstStrings() {
if (!cstr_array)
cstr_global = nullptr;
- if (!RewriteObjCConstString(nsstring_global, cstr_global)) {
- LLDB_LOG(log, "Error rewriting the constant string");
-
- // We don't print an error message here because RewriteObjCConstString
- // has done so for us.
+ // Queue up replacing the string as we are currently iterating
+ // over the module.
+ nsstring_to_cstr_list.emplace_back(nsstring_global, cstr_global);
+ }
+ }
- return false;
- }
+ for (const auto &nsstring_and_cstr : nsstring_to_cstr_list) {
+ auto [nsstring_global, cstr_global] = nsstring_and_cstr;
----------------
kastiglione wrote:
```suggestion
for (auto [nsstring_global, cstr_global] : nsstring_to_cstr_list) {
```
https://github.com/llvm/llvm-project/pull/203035
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits