zequanwu added inline comments.
================ Comment at: compiler-rt/test/profile/Darwin/coverage-debug-info-correlate.cpp:29 + +// RUN: llvm-cov report --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NONAME + ---------------- ellis wrote: > Is it worth testing that `%t.normal.profdata` emits the same coverage? Added testing for `%t.normal.profdata`. ================ Comment at: llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp:1019-1029 + if (auto E = NamesSection.takeError()) { + if (ProfileNames.isEmpty()) + return std::move(E); + consumeError(std::move(E)); + } else { + std::vector<SectionRef> NamesSectionRefs = *NamesSection; + if (NamesSectionRefs.size() != 1) ---------------- ellis wrote: > I don't quite understand why this was changed. Is there is a test case that > covers this? This part of code is used by llvm-cov. Originally, it always checks if the instrumented binary contains the `__llvm_prf_names ` section and assumes all instrumented function names are store there. Now, it will firstly create `InstrProfSymtab` from the indexed profile file and add remaining function names to this `InstrProfSymtab` from `__llvm_prf_names` section in the instrumented binary, if there is one. This is covered by `// RUN: llvm-cov export --format=lcov --instr-profile=%t.profdata %t | FileCheck %s -check-prefix=NAME`, where `_Z9used_funcv` and `main` are stored in debug info and later moved to indexed profile file, and `_ZN1A11unused_funcEv` is stored in `__llvm_prf_names` section in the binary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157913/new/ https://reviews.llvm.org/D157913 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits