[llvm] [llvm-profgen] Support COFF binary (PR #83972)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 15:09:48 PST 2024


================
@@ -718,7 +740,8 @@ void ProfiledBinary::disassemble(const ELFObjectFileBase *Obj) {
   }
 
   // Dissassemble rodata section to check if FS discriminator symbol exists.
-  checkUseFSDiscriminator(Obj, AllSymbols);
+  if (auto *ELFObj = dyn_cast<ELFObjectFileBase>(Obj))
+    checkUseFSDiscriminator(ELFObj, AllSymbols);
----------------
wlei-llvm wrote:

Should we support `checkUseFSDiscriminator`(FS-FDO) for COFF?  the function just parses the section names to check if "__llvm_fs_discriminator__" name exists, feels it's independent to the format. 

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


More information about the llvm-commits mailing list