diff options
author | Hans Wennborg <hans@chromium.org> | 2020-07-22 17:01:57 +0200 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-07-22 17:09:20 +0200 |
commit | 238bbd48c5a5f84deca36e5df980241578f7c1df (patch) | |
tree | 6a726a47f655de00111726cdb0d9084ef65982ac /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | b99898c1e9c5d8bade1d898e84604d3241b0087c (diff) | |
download | llvm-238bbd48c5a5f84deca36e5df980241578f7c1df.zip llvm-238bbd48c5a5f84deca36e5df980241578f7c1df.tar.gz llvm-238bbd48c5a5f84deca36e5df980241578f7c1df.tar.bz2 |
Revert abd45154b "[Coverage] Add comment to skipped regions"
This casued assertions during Chromium builds. See comment on the code review
> Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757.
> Add comment to skipped regions so we don't track execution count for lines containing only comments.
>
> Differential Revision: https://reviews.llvm.org/D84208
This reverts commit abd45154bdb6b76c5b480455eacc8c75b08242aa and the
follow-up 87d725473380652bbe845fd2fbd9c0507a55172f.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 5a6ce0f..5592511 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -990,9 +990,11 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { CoverageSourceInfo *CoverageInfo = nullptr; // Add the preprocessor callback only when the coverage mapping is generated. - if (CI.getCodeGenOpts().CoverageMapping) - CoverageInfo = CodeGen::CoverageMappingModuleGen::setUpCoverageCallbacks( - CI.getPreprocessor()); + if (CI.getCodeGenOpts().CoverageMapping) { + CoverageInfo = new CoverageSourceInfo; + CI.getPreprocessor().addPPCallbacks( + std::unique_ptr<PPCallbacks>(CoverageInfo)); + } std::unique_ptr<BackendConsumer> Result(new BackendConsumer( BA, CI.getDiagnostics(), CI.getHeaderSearchOpts(), |