<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Apologies, I see now you fixed it in a separate commit.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 5, 2021, at 10:19 AM, Shafik Yaghmour via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The last <div class=""><br class=""></div><div class=""><span style="caret-color: rgb(36, 41, 46); color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; white-space: pre; background-color: rgb(230, 255, 237);" class="">location_spec</span></div><div class=""><br class=""></div><div class="">On line 341 does not seem to be used.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On May 4, 2021, at 5:34 PM, Med Ismail Bennani via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class="">Author: Med Ismail Bennani<br class="">Date: 2021-05-05T00:34:44Z<br class="">New Revision: 30fcdf0b196600001ca77767bd41ceba03f5dd33<br class=""><br class="">URL: <a href="https://github.com/llvm/llvm-project/commit/30fcdf0b196600001ca77767bd41ceba03f5dd33" class="">https://github.com/llvm/llvm-project/commit/30fcdf0b196600001ca77767bd41ceba03f5dd33</a><br class="">DIFF: <a href="https://github.com/llvm/llvm-project/commit/30fcdf0b196600001ca77767bd41ceba03f5dd33.diff" class="">https://github.com/llvm/llvm-project/commit/30fcdf0b196600001ca77767bd41ceba03f5dd33.diff</a><br class=""><br class="">LOG: [lldb/Symbol] Update SymbolFilePDB unitest with SourceLocationSpec<br class=""><br class="">This patch should fix the windows test failure following `3e2ed7440569`.<br class=""><br class="">It makes use of a `SourceLocationSpec` object when resolving a symbol<br class="">context from `SymbolFilePDB` file.<br class=""><br class="">Signed-off-by: Med Ismail Bennani <<a href="mailto:medismail.bennani@gmail.com" class="">medismail.bennani@gmail.com</a>><br class=""><br class="">Added: <br class=""><br class=""><br class="">Modified: <br class=""> lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp<br class=""><br class="">Removed: <br class=""><br class=""><br class=""><br class="">################################################################################<br class="">diff --git a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp<br class="">index 63bb6b7c40436..f9df3ced747d4 100644<br class="">--- a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp<br class="">+++ b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp<br class="">@@ -171,8 +171,9 @@ TEST_F(SymbolFilePDBTests, TestResolveSymbolContextBasename) {<br class=""><br class=""> FileSpec header_spec("test-pdb.cpp");<br class=""> SymbolContextList sc_list;<br class="">+ SourceLocationSpec location_spec(header_spec, /*line=*/0);<br class=""> uint32_t result_count = symfile->ResolveSymbolContext(<br class="">- header_spec, 0, false, lldb::eSymbolContextCompUnit, sc_list);<br class="">+ location_spec, lldb::eSymbolContextCompUnit, sc_list);<br class=""> EXPECT_EQ(1u, result_count);<br class=""> EXPECT_TRUE(ContainsCompileUnit(sc_list, header_spec));<br class=""> }<br class="">@@ -190,8 +191,9 @@ TEST_F(SymbolFilePDBTests, TestResolveSymbolContextFullPath) {<br class=""> FileSpec header_spec(<br class=""> R"spec(D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.cpp)spec");<br class=""> SymbolContextList sc_list;<br class="">+ SourceLocationSpec location_spec(header_spec, /*line=*/0);<br class=""> uint32_t result_count = symfile->ResolveSymbolContext(<br class="">- header_spec, 0, false, lldb::eSymbolContextCompUnit, sc_list);<br class="">+ location_spec, lldb::eSymbolContextCompUnit, sc_list);<br class=""> EXPECT_GE(1u, result_count);<br class=""> EXPECT_TRUE(ContainsCompileUnit(sc_list, header_spec));<br class=""> }<br class="">@@ -214,8 +216,10 @@ TEST_F(SymbolFilePDBTests, TestLookupOfHeaderFileWithInlines) {<br class=""> FileSpec alt_cpp_spec("test-pdb-alt.cpp");<br class=""> for (const auto &hspec : header_specs) {<br class=""> SymbolContextList sc_list;<br class="">+ SourceLocationSpec location_spec(hspec, /*line=*/0, /*column=*/llvm::None,<br class="">+ /*check_inlines=*/true);<br class=""> uint32_t result_count = symfile->ResolveSymbolContext(<br class="">- hspec, 0, true, lldb::eSymbolContextCompUnit, sc_list);<br class="">+ location_spec, lldb::eSymbolContextCompUnit, sc_list);<br class=""> EXPECT_EQ(2u, result_count);<br class=""> EXPECT_TRUE(ContainsCompileUnit(sc_list, main_cpp_spec));<br class=""> EXPECT_TRUE(ContainsCompileUnit(sc_list, alt_cpp_spec));<br class="">@@ -238,8 +242,9 @@ TEST_F(SymbolFilePDBTests, TestLookupOfHeaderFileWithNoInlines) {<br class=""> FileSpec("test-pdb-nested.h")};<br class=""> for (const auto &hspec : header_specs) {<br class=""> SymbolContextList sc_list;<br class="">+ SourceLocationSpec location_spec(hspec, /*line=*/0);<br class=""> uint32_t result_count = symfile->ResolveSymbolContext(<br class="">- hspec, 0, false, lldb::eSymbolContextCompUnit, sc_list);<br class="">+ location_spec, lldb::eSymbolContextCompUnit, sc_list);<br class=""> EXPECT_EQ(0u, result_count);<br class=""> }<br class=""> }<br class="">@@ -264,8 +269,9 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchAll) {<br class=""> lldb::SymbolContextItem scope =<br class=""> lldb::eSymbolContextCompUnit | lldb::eSymbolContextLineEntry;<br class=""><br class="">- uint32_t count =<br class="">- symfile->ResolveSymbolContext(source_file, 0, true, scope, sc_list);<br class="">+ SourceLocationSpec location_spec(<br class="">+ source_file, /*line=*/0, /*column=*/llvm::None, /*check_inlines=*/true);<br class="">+ uint32_t count = symfile->ResolveSymbolContext(location_spec, scope, sc_list);<br class=""> EXPECT_EQ(1u, count);<br class=""> SymbolContext sc;<br class=""> EXPECT_TRUE(sc_list.GetContextAtIndex(0, sc));<br class="">@@ -314,8 +320,9 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchSpecific) {<br class=""> lldb::eSymbolContextCompUnit | lldb::eSymbolContextLineEntry;<br class=""><br class=""> // First test with line 7, and verify that only line 7 entries are added.<br class="">- uint32_t count =<br class="">- symfile->ResolveSymbolContext(source_file, 7, true, scope, sc_list);<br class="">+ SourceLocationSpec location_spec(<br class="">+ source_file, /*line=*/7, /*column=*/llvm::None, /*check_inlines=*/true);<br class="">+ uint32_t count = symfile->ResolveSymbolContext(location_spec, scope, sc_list);<br class=""> EXPECT_EQ(1u, count);<br class=""> SymbolContext sc;<br class=""> EXPECT_TRUE(sc_list.GetContextAtIndex(0, sc));<br class="">@@ -331,6 +338,8 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchSpecific) {<br class=""><br class=""> sc_list.Clear();<br class=""> // Then test with line 9, and verify that only line 9 entries are added.<br class="">+ location_spec = SourceLocationSpec(<br class="">+ source_file, /*line=*/9, /*column=*/llvm::None, /*check_inlines=*/true);<br class=""> count = symfile->ResolveSymbolContext(source_file, 9, true, scope, sc_list);<br class=""> EXPECT_EQ(1u, count);<br class=""> EXPECT_TRUE(sc_list.GetContextAtIndex(0, sc));<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class=""></div></div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">lldb-commits mailing list<br class=""><a href="mailto:lldb-commits@lists.llvm.org" class="">lldb-commits@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits<br class=""></div></blockquote></div><br class=""></body></html>