diff --git a/lib/IRGen/GenDecl.cpp b/lib/IRGen/GenDecl.cpp index cb35a96febc4c..60aabd107152e 100644 --- a/lib/IRGen/GenDecl.cpp +++ b/lib/IRGen/GenDecl.cpp @@ -1105,11 +1105,8 @@ void IRGenerator::emitGlobalTopLevel(llvm::StringSet<> *linkerDirectives) { IGM->emitSILDifferentiabilityWitness(&dw); } - // Emit code coverage mapping data for all modules - for (auto Iter : *this) { - IRGenModule *IGM = Iter.second; - IGM->emitCoverageMapping(); - } + // Emit code coverage mapping data. + PrimaryIGM->emitCoverageMapping(); for (auto Iter : *this) { IRGenModule *IGM = Iter.second; diff --git a/test/Profiler/Inputs/coverage_num_threads1.swift b/test/Profiler/Inputs/coverage_num_threads1.swift deleted file mode 100644 index 6ca641732e7e1..0000000000000 --- a/test/Profiler/Inputs/coverage_num_threads1.swift +++ /dev/null @@ -1 +0,0 @@ -func func1() {} diff --git a/test/Profiler/Inputs/coverage_num_threads2.swift b/test/Profiler/Inputs/coverage_num_threads2.swift deleted file mode 100644 index 639ea1b4ad4b7..0000000000000 --- a/test/Profiler/Inputs/coverage_num_threads2.swift +++ /dev/null @@ -1 +0,0 @@ -func func2() {} diff --git a/test/Profiler/coverage_num_threads.swift b/test/Profiler/coverage_num_threads.swift deleted file mode 100644 index 1a50c76335596..0000000000000 --- a/test/Profiler/coverage_num_threads.swift +++ /dev/null @@ -1,12 +0,0 @@ -// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -num-threads 0 -emit-ir %S/Inputs/coverage_num_threads1.swift | %FileCheck %s -check-prefix=SINGLE-SOURCE --implicit-check-not="llvm_coverage_mapping =" - -// SINGLE-SOURCE: llvm_coverage_mapping = - -// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -num-threads 0 -emit-ir %S/Inputs/coverage_num_threads1.swift %S/Inputs/coverage_num_threads2.swift | %FileCheck %s -check-prefix=SINGLE-OBJECT --implicit-check-not="llvm_coverage_mapping =" - -// SINGLE-OBJECT: llvm_coverage_mapping = - -// RUN: %target-swift-frontend -profile-generate -profile-coverage-mapping -num-threads 2 -emit-ir %S/Inputs/coverage_num_threads1.swift %S/Inputs/coverage_num_threads2.swift | %FileCheck %s -check-prefix=MULTIPLE-OBJECTS --implicit-check-not="llvm_coverage_mapping =" - -// MULTIPLE-OBJECTS: llvm_coverage_mapping = -// MULTIPLE-OBJECTS: llvm_coverage_mapping =