[llvm] [Coverage] Skip empty profile name section (PR #108480)
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 10:22:00 PDT 2024
================
@@ -1065,6 +1065,9 @@ lookupSections(ObjectFile &OF, InstrProfSectKind IPSK) {
// start/end of the section. If its size is 2 bytes, it's empty.
if (IsCOFF && IPSK == IPSK_name && Section.getSize() == 2)
continue;
+ // Skip empty profile name section.
+ if (IPSK == IPSK_name && Section.getSize() == 0)
+ continue;
----------------
petrhosek wrote:
I think the two conditions should be combined since they cover the same case.
```suggestion
if (IPSK == IPSK_name && (Section.getSize() == 0 || (IsCOFF && Section.getSize() == 2)))
continue;
```
https://github.com/llvm/llvm-project/pull/108480
More information about the llvm-commits
mailing list