[llvm] 0ac13af - [llvm-pdbutil] Pass filename when formatting `setfile` annotation (#149705)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 04:27:14 PDT 2025


Author: nerix
Date: 2025-09-18T07:27:10-04:00
New Revision: 0ac13afc2de80badc86f921c02a0c2e3ccb230fa

URL: https://github.com/llvm/llvm-project/commit/0ac13afc2de80badc86f921c02a0c2e3ccb230fa
DIFF: https://github.com/llvm/llvm-project/commit/0ac13afc2de80badc86f921c02a0c2e3ccb230fa.diff

LOG: [llvm-pdbutil] Pass filename when formatting `setfile` annotation (#149705)

When dumping a PDB with an inlinesite that had a ChangeFile annotation,
the `Filename` wasn't passed to the format string. This hit an assertion
in debug mode and silently failed in release mode.

Added: 
    

Modified: 
    llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
index 66a091f50d6b2..caed429f8bc4f 100644
--- a/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
+++ b/llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp
@@ -773,7 +773,7 @@ Error MinimalSymbolDumper::visitKnownRecord(CVSymbol &CVR, InlineSiteSym &IS) {
         else
           return MaybeFile.takeError();
       }
-      P.format(" setfile {0} 0x{1}", utohexstr(FileOffset));
+      P.format(" setfile {0} 0x{1}", Filename, utohexstr(FileOffset));
       break;
     }
 


        


More information about the llvm-commits mailing list