-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Emit coverage mappings for all modules #32216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
func func1() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
func func2() {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// 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 =" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there some way other than -num-threads to control how files are split up into different modules (maybe @eeckstein knows)? The issue on Windows appears to be that only the IR for one of the modules is printed out. The first '@__llvm_coverage_mapping =' definition is matched, but the second isn't. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're able to quickly test this (I'm spinning up a windows env now) does changing the thread count to 1 change this behavior? I originally did 2 just to make it super clear it was going through the multi-threaded path but 1 also does, so if that affected this that test would still be valid. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have access to a Windows environment right now. And I'm not sure I follow your comment here: why should swift only emit the IR for one module, given two source files and -num-threads=2? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I'm definitely not saying it should, it sounds like a bug in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For historians this was re-merged here #32352 |
||
|
||
// MULTIPLE-OBJECTS: llvm_coverage_mapping = | ||
// MULTIPLE-OBJECTS: llvm_coverage_mapping = |
Uh oh!
There was an error while loading. Please reload this page.