[llvm] [PDB] Add public symbol lookup by address (PR #157361)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 7 13:06:12 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/unittests/DebugInfo/PDB/Inputs/PublicSymbols.cpp llvm/unittests/DebugInfo/PDB/PublicsStreamTest.cpp llvm/include/llvm/DebugInfo/PDB/Native/PublicsStream.h llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/unittests/DebugInfo/PDB/PublicsStreamTest.cpp b/llvm/unittests/DebugInfo/PDB/PublicsStreamTest.cpp
index 708b42a3c..bac490107 100644
--- a/llvm/unittests/DebugInfo/PDB/PublicsStreamTest.cpp
+++ b/llvm/unittests/DebugInfo/PDB/PublicsStreamTest.cpp
@@ -30,7 +30,7 @@ static std::string getExePath() {
 TEST(PublicsStreamTest, FindByAddress) {
   std::string ExePath = getExePath();
   auto Buffer = MemoryBuffer::getFile(ExePath, /*IsText=*/false,
-                                  /*RequiresNullTerminator=*/false);
+                                      /*RequiresNullTerminator=*/false);
   ASSERT_TRUE(bool(Buffer));
   auto Stream = std::make_unique<MemoryBufferByteStream>(
       std::move(*Buffer), llvm::endianness::little);
@@ -47,7 +47,8 @@ TEST(PublicsStreamTest, FindByAddress) {
 
   auto VTableDerived = Publics->findByAddress(*Symbols, 2, 8);
   ASSERT_TRUE(VTableDerived.has_value());
-  // both derived and derived2 have their vftables there - but derived2 is first (due to ICF)
+  // both derived and derived2 have their vftables there - but derived2 is first
+  // (due to ICF)
   ASSERT_EQ(VTableDerived->first.Name, "??_7Derived2@@6B@");
   ASSERT_EQ(VTableDerived->second, 26);
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/157361


More information about the llvm-commits mailing list