Skip to content

Commit 352477c

Browse files
committed
Workaround -Wglobal-constructor warning.
This line was tripping the -Wglobal-constructor warning which was causing a build failure when -Werror was turned on. code review comment
1 parent 503fb1a commit 352477c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Support/CodeGenCoverage.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
using namespace llvm;
2323

24-
static sys::SmartMutex<true> OutputMutex;
25-
2624
CodeGenCoverage::CodeGenCoverage() = default;
2725

2826
void CodeGenCoverage::setCovered(uint64_t RuleID) {
@@ -79,6 +77,7 @@ bool CodeGenCoverage::parse(MemoryBuffer &Buffer, StringRef BackendName) {
7977
bool CodeGenCoverage::emit(StringRef CoveragePrefix,
8078
StringRef BackendName) const {
8179
if (!CoveragePrefix.empty() && !RuleCoverage.empty()) {
80+
static sys::SmartMutex<true> OutputMutex;
8281
sys::SmartScopedLock<true> Lock(OutputMutex);
8382

8483
// We can handle locking within a process easily enough but we don't want to

0 commit comments

Comments
 (0)