[Lldb-commits] [lldb] [lldb] fix release build (PR #68979)

via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 13 04:35:49 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Mikhail Goncharov (metaflow)

<details>
<summary>Changes</summary>

due to 64d78d8b3cd09dff32c97fbefa56bcfc8b676406 that used side effects in assert()

---
Full diff: https://github.com/llvm/llvm-project/pull/68979.diff


1 Files Affected:

- (modified) lldb/source/Commands/CommandObjectTarget.cpp (+8-6) 


``````````diff
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 0c378b069086d03..7c20893db243c92 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -2682,12 +2682,14 @@ class CommandObjectTargetModulesDumpSeparateDebugInfoFiles
               llvm::StringRef type;
               llvm::StringRef symfile;
               StructuredData::Array *files;
-              assert(separate_debug_info_list->GetValueForKeyAsString("type",
-                                                                      type));
-              assert(separate_debug_info_list->GetValueForKeyAsString("symfile",
-                                                                      symfile));
-              assert(separate_debug_info_list->GetValueForKeyAsArray(
-                  "separate-debug-info-files", files));
+              if (!(separate_debug_info_list->GetValueForKeyAsString("type",
+                                                                     type) &&
+                    separate_debug_info_list->GetValueForKeyAsString("symfile",
+                                                                     symfile) &&
+                    separate_debug_info_list->GetValueForKeyAsArray(
+                        "separate-debug-info-files", files))) {
+                assert(false);
+              }
 
               strm << "Symbol file: " << symfile;
               strm.EOL();

``````````

</details>


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


More information about the lldb-commits mailing list