There isn't a reason for it to be disabled.
It was disabled by this merge commit. I'll follow-up to see how we can
avoid this in the future.
commit 78b28243ff
Merge remote-tracking branch 'origin/master' into master-next
Passing {FileID} into the CoverageMappingWriter constructor causes UB.
The ArrayRef constructed from the initializer list becomes invalid once
the constructor returns, because the lifetime of the initializer list
expires. Use an alternate ArrayRef constructor which outlives the
CoverageMappingWriter instance.
This commit also re-reenables coverage_smoke.swift.
rdar://problem/29591622
We disabled this test because it started failing on the incremental
bots. However, I couldn't reproduce the failure locally with a clean
build. Try to reproduce the failure by enabling the test and running it
through CI.
Context: The specific failure was the llvm-cov detected a malformed
coverage mapping in the 'coverage_smoke' binary. While debugging the
issue, I found that the problem is that a FilenameIndex is invalid
(refer: readIntMax(FilenameIndex, TranslationUnitFilenames.size(), in
llvm's CoverageMappingReader). This means that the swift compiler is
somehow generating an invalid index, although I don't see how this is
possible.
Swift permits function decls within function decls. ~ProfilerRAII would
destroy the current profiling context upon entering a nested function
decl instead of preserving it for later use. Fix the issue by recording
the correct context in ProfilerRAII.
We're not linking correctly for some reason. Filed rdar://problem/25626783
to look into it. (Not filed publicly because there's information from an
internal bot.)