https://github.com/Michael137 created 
https://github.com/llvm/llvm-project/pull/141220

`parseAndLoadModuleMapFile` returns `true` on error. This seems to have always 
been an issue? This is now preventing me from fixing a different modules 
related issue. So this patch checks the return value correctly.

>From eeb97c3ad4fc761323b7033481a37dfb942a64bf Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuc...@gmail.com>
Date: Fri, 23 May 2025 10:42:21 +0100
Subject: [PATCH] [lldb][Modules] Fix error handling of
 parseAndLoadModuleMapFile

`parseAndLoadModuleMapFile` returns `true` on error. This seems to have
always been an issue? This is now preventing me from fixing a different
modules related issue. So this patch checks the return value correctly.
---
 .../Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index eb62cb618f254..c99ed9dd0a68d 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -330,7 +330,7 @@ bool ClangModulesDeclVendorImpl::AddModule(const 
SourceModule &module,
       auto file = HS.lookupModuleMapFile(*dir, is_framework);
       if (!file)
         return error();
-      if (!HS.parseAndLoadModuleMapFile(*file, is_system))
+      if (HS.parseAndLoadModuleMapFile(*file, is_system))
         return error();
     }
   }

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to