Skip to content

Commit 1dc51e7

Browse files
authored
Merge pull request #69956 from hamishknight/counter-offer-5.10
2 parents 682e06c + fd870ad commit 1dc51e7

File tree

4 files changed

+175
-176
lines changed

4 files changed

+175
-176
lines changed

include/swift/SIL/SILCoverageMap.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,16 @@ class SILCoverageMap : public llvm::ilist_node<SILCoverageMap>,
127127
return Expressions;
128128
}
129129

130-
void printCounter(llvm::raw_ostream &OS, llvm::coverage::Counter C) const;
130+
/// Print a given profiling counter expression, given the reference to the
131+
/// counter, and the list of counters it may reference.
132+
static void
133+
printCounter(llvm::raw_ostream &OS, llvm::coverage::Counter C,
134+
ArrayRef<llvm::coverage::CounterExpression> Expressions);
135+
136+
/// Print a given profiling counter expression.
137+
void printCounter(llvm::raw_ostream &OS, llvm::coverage::Counter C) const {
138+
printCounter(OS, C, getExpressions());
139+
}
131140

132141
/// Print the coverage map.
133142
void print(llvm::raw_ostream &OS, bool Verbose = false,

lib/SIL/IR/SILCoverageMap.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ struct Printer {
8686
};
8787
} // end anonymous namespace
8888

89-
void SILCoverageMap::printCounter(llvm::raw_ostream &OS,
90-
llvm::coverage::Counter C) const {
91-
OS << Printer(C, getExpressions());
89+
void SILCoverageMap::printCounter(
90+
llvm::raw_ostream &OS, llvm::coverage::Counter C,
91+
ArrayRef<llvm::coverage::CounterExpression> Expressions) {
92+
OS << Printer(C, Expressions);
9293
}

0 commit comments

Comments
 (0)