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

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


Author: Mikhail Goncharov
Date: 2023-10-13T13:53:31+02:00
New Revision: 5d35273a32d239b7407338e13ed71b59174d6536

URL: https://github.com/llvm/llvm-project/commit/5d35273a32d239b7407338e13ed71b59174d6536
DIFF: https://github.com/llvm/llvm-project/commit/5d35273a32d239b7407338e13ed71b59174d6536.diff

LOG: [lldb] fix release build (#68979)

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

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectTarget.cpp

Removed: 
    


################################################################################
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();


        


More information about the lldb-commits mailing list