diff options
author | dim <dim@FreeBSD.org> | 2016-01-27 22:48:52 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-27 22:48:52 +0000 |
commit | 2c8b37701007da0b1290d6550bc8cddadbb513fe (patch) | |
tree | d30c8f2261d23e1c3239fea725fc8c13416d10ff /contrib/llvm/lib/Transforms | |
parent | e94fcba08326e935f67bf7cefa2cf2e3c4cb4be5 (diff) | |
download | FreeBSD-src-2c8b37701007da0b1290d6550bc8cddadbb513fe.zip FreeBSD-src-2c8b37701007da0b1290d6550bc8cddadbb513fe.tar.gz |
Update llvm, clang and lldb to release_38 branch r258968.
Diffstat (limited to 'contrib/llvm/lib/Transforms')
-rw-r--r-- | contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index fa939ae..ffde7f8 100644 --- a/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -494,6 +494,11 @@ void GCOVProfiler::emitProfileNotes() { // LTO, we'll generate the same .gcno files. auto *CU = cast<DICompileUnit>(CU_Nodes->getOperand(i)); + + // Skip module skeleton (and module) CUs. + if (CU->getDWOId()) + continue; + std::error_code EC; raw_fd_ostream out(mangleName(CU, "gcno"), EC, sys::fs::F_None); std::string EdgeDestinations; @@ -853,6 +858,11 @@ Function *GCOVProfiler::insertCounterWriteout( if (CU_Nodes) { for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) { auto *CU = cast<DICompileUnit>(CU_Nodes->getOperand(i)); + + // Skip module skeleton (and module) CUs. + if (CU->getDWOId()) + continue; + std::string FilenameGcda = mangleName(CU, "gcda"); uint32_t CfgChecksum = FileChecksums.empty() ? 0 : FileChecksums[i]; Builder.CreateCall(StartFile, |