diff --git a/lib/IRGen/GenCoverage.cpp b/lib/IRGen/GenCoverage.cpp index 1ac2709f51fba..eb1d589d01e74 100644 --- a/lib/IRGen/GenCoverage.cpp +++ b/lib/IRGen/GenCoverage.cpp @@ -97,8 +97,9 @@ void IRGenModule::emitCoverageMapping() { MR.Counter, /*FileID=*/0, MR.StartLine, MR.StartCol, MR.EndLine, MR.EndCol)); // Append each function's regions into the encoded buffer. - llvm::coverage::CoverageMappingWriter W({FileID}, M.getExpressions(), - Regions); + ArrayRef VirtualFileMapping(FileID); + llvm::coverage::CoverageMappingWriter W(VirtualFileMapping, + M.getExpressions(), Regions); W.write(OS); std::string NameValue = llvm::getPGOFuncName( diff --git a/test/SILGen/coverage_smoke.swift b/test/SILGen/coverage_smoke.swift index e76a8718e2d42..756809e578235 100644 --- a/test/SILGen/coverage_smoke.swift +++ b/test/SILGen/coverage_smoke.swift @@ -1,4 +1,3 @@ -// REQUIRES: rdar://29591622 // RUN: rm -rf %t && mkdir -p %t // RUN: %target-build-swift %s -profile-generate -profile-coverage-mapping -Xfrontend -disable-incremental-llvm-codegen -o %t/main // RUN: env LLVM_PROFILE_FILE=%t/default.profraw %target-run %t/main