[lld] [llvm] [llvm-readobj][COFF] Consistent PDBGUID Formatting (PR #94256)

Miguel A. Arroyo via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 16:40:05 PDT 2024


================
@@ -793,7 +794,10 @@ void COFFDumper::printCOFFDebugDirectory() {
       DictScope PDBScope(W, "PDBInfo");
       W.printHex("PDBSignature", DebugInfo->Signature.CVSignature);
       if (DebugInfo->Signature.CVSignature == OMF::Signature::PDB70) {
-        W.printBinary("PDBGUID", ArrayRef(DebugInfo->PDB70.Signature));
+        SmallString<38> FormattedGUIDStr;
+        raw_svector_ostream OS(FormattedGUIDStr);
----------------
mayanez wrote:

Thanks for the prompt feedback!

Unfortunately, the suggestion didn't work without first overloading `operator<<` for  `detail:GuidAdapter`. 
``` 
candidate function not viable: no known conversion from 'detail::GuidAdapter' to 'const FormattedBytes'
```

I added the change as a separate commit. Let me know if you prefer I rebase it onto the previous.

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


More information about the llvm-commits mailing list