[Lldb-commits] [lldb] [lldb][Module][NFC] Remove redundant FileSpec validity check (PR #188708)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 26 02:23:03 PDT 2026
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/188708
We already do the validity check inside of `FileSystem::Instance().Exists`.
>From e0781e607ddda4cda54069975fd7f8f42a38439c Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 26 Mar 2026 09:19:53 +0000
Subject: [PATCH] [lldb][Module][NFC] Remove redundant FileSpec validity check
We already do the validity check inside of `FileSystem::Instance().Exists`.
---
lldb/source/Core/Module.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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