[llvm] [llvm-pdbutil] Avoid reading EC names from non-EC modules (PR #223253)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 04:22:44 PDT 2026


================
@@ -503,15 +503,18 @@ Error DumpOutputStyle::dumpModules() {
                      Desc.getModuleStreamIndex(), Desc.getNumberOfFiles(),
                      Desc.hasECInfo());
 
-        auto PdbPathOrErr = Stream.getECName(Desc.getPdbFilePathNameIndex());
-        if (!PdbPathOrErr)
-          return PdbPathOrErr.takeError();
-        StringRef PdbFilePath = *PdbPathOrErr;
-
-        auto SrcPathOrErr = Stream.getECName(Desc.getSourceFileNameIndex());
-        if (!SrcPathOrErr)
-          return SrcPathOrErr.takeError();
-        StringRef SrcFilePath = *SrcPathOrErr;
+        StringRef PdbFilePath, SrcFilePath;
+        if (Desc.getPdbFilePathNameIndex() || Desc.getSourceFileNameIndex()) {
----------------
Nerixyz wrote:

Oh, sorry, I missed that these were different indices - thought they were checking the same thing. But since one can be set and the other absent, this should be separated.

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


More information about the llvm-commits mailing list