[Lldb-commits] [lldb] [lldb] Fix SymbolFilePDBTests after FileSpec change f9b5264523b1 (PR #208425)
Stefan Gränitz via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 9 04:08:42 PDT 2026
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/208425
GetDirectory() returns a StringRef now which doesn't convert to bool implicitly. This breaks compilation of the check-lldb target: `binary '&&': no operator found which takes a left-hand operand of type 'llvm::StringRef'`
>From df40f1673dada0cef09581ac0c173e2335ad5640 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= <stefan.graenitz at gmail.com>
Date: Thu, 9 Jul 2026 13:03:41 +0200
Subject: [PATCH] [lldb] Fix SymbolFilePDBTests after FileSpec change
f9b5264523b1
---
lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
index 7dd0a4a0f1871..bb1e0d8cd1fea 100644
--- a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
+++ b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
@@ -94,7 +94,7 @@ class SymbolFilePDBTests : public testing::Test {
if (!left.FileEquals(right))
return false;
// If BOTH have a directory, also compare the directories.
- if (left.GetDirectory() && right.GetDirectory())
+ if (!left.GetDirectory().empty() && !right.GetDirectory().empty())
return left.DirectoryEquals(right);
// If one has a directory but not the other, they match.
More information about the lldb-commits
mailing list