Skip to content

Commit

Permalink
Workaround -Wglobal-constructor warning. (#94699)
Browse files Browse the repository at this point in the history
This line was tripping the -Wglobal-constructor warning which was
causing a build failure when -Werror was turned on.
  • Loading branch information
schweitzpgi authored Jun 10, 2024
1 parent c5978f1 commit 7326aa7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Support/CodeGenCoverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

using namespace llvm;

static sys::SmartMutex<true> OutputMutex;

CodeGenCoverage::CodeGenCoverage() = default;

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

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

0 comments on commit 7326aa7

Please sign in to comment.