[PATCH] D136855: [Binary] Support extracting offloading files from COFF

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 12:07:07 PDT 2022


rnk added a comment.

Seems reasonable to me.



================
Comment at: llvm/lib/Object/OffloadBinary.cpp:75-76
   for (ELFSectionRef Sec : Obj.sections()) {
     if (Sec.getType() != ELF::SHT_LLVM_OFFLOADING)
       continue;
 
----------------
Rather than duplicating the code, I think it makes sense to do the ELF check inside the loop. You can construct an ELFSectionRef from a regular SectionRef if the object is an ELF file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136855/new/

https://reviews.llvm.org/D136855



More information about the llvm-commits mailing list