[Lldb-commits] [lldb] [lldb] fix release build (PR #68979)
Mikhail Goncharov via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 13 04:34:45 PDT 2023
https://github.com/metaflow created https://github.com/llvm/llvm-project/pull/68979
due to 64d78d8b3cd09dff32c97fbefa56bcfc8b676406 that used side effects in assert()
>From d632aa31f3b5a5a98bc84b4523f06f82e9d7e8a8 Mon Sep 17 00:00:00 2001
From: Mikhail Goncharov <goncharov.mikhail at gmail.com>
Date: Fri, 13 Oct 2023 13:34:07 +0200
Subject: [PATCH] [lldb] fix release build
due to 64d78d8b3cd09dff32c97fbefa56bcfc8b676406 that used side effects
in assert()
---
lldb/source/Commands/CommandObjectTarget.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
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