[Lldb-commits] [lldb] 948a914 - [lldb][Module][NFC] Remove redundant FileSpec validity check (#188708)

via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 26 02:30:03 PDT 2026


Author: Michael Buch
Date: 2026-03-26T09:29:57Z
New Revision: 948a91429e770f546129f1f88034ed96b1940179

URL: https://github.com/llvm/llvm-project/commit/948a91429e770f546129f1f88034ed96b1940179
DIFF: https://github.com/llvm/llvm-project/commit/948a91429e770f546129f1f88034ed96b1940179.diff

LOG: [lldb][Module][NFC] Remove redundant FileSpec validity check (#188708)

We already do the validity check inside of
`FileSystem::Instance().Exists`.

Added: 
    

Modified: 
    lldb/source/Core/Module.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index e34e639392f1a..df73872c83685 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1463,7 +1463,7 @@ bool Module::LoadScriptingResourceInTarget(Target *target, Status &error) {
 
   for (uint32_t i = 0; i < num_specs; ++i) {
     FileSpec scripting_fspec(file_specs.GetFileSpecAtIndex(i));
-    if (!scripting_fspec && !FileSystem::Instance().Exists(scripting_fspec))
+    if (!FileSystem::Instance().Exists(scripting_fspec))
       continue;
 
     if (should_load == eLoadScriptFromSymFileWarn) {


        


More information about the lldb-commits mailing list