Skip to content

Commit 1fa44da

Browse files
Address a comment.
1 parent ef1403c commit 1fa44da

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

llvm/include/llvm/Support/ScopedPrinter.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,11 @@ class LLVM_ABI ScopedPrinter {
284284
startLine() << Label << ": " << (Value ? "Yes" : "No") << '\n';
285285
}
286286

287-
template <typename... T> void printVersion(StringRef Label, T... Version) {
287+
template <typename T, typename... TArgs>
288+
void printVersion(StringRef Label, T MajorVersion, TArgs... MinorVersions) {
288289
startLine() << Label << ": ";
289-
printVersionInternal(Version...);
290+
getOStream() << MajorVersion;
291+
((getOStream() << '.' << MinorVersions), ...);
290292
getOStream() << "\n";
291293
}
292294

@@ -454,12 +456,6 @@ class LLVM_ABI ScopedPrinter {
454456
virtual raw_ostream &getOStream() { return OS; }
455457

456458
private:
457-
template <typename T, typename... TArgs>
458-
void printVersionInternal(T Value, TArgs... Args) {
459-
getOStream() << Value;
460-
((getOStream() << '.' << Args), ...);
461-
}
462-
463459
static bool flagName(const FlagEntry &LHS, const FlagEntry &RHS) {
464460
return LHS.Name < RHS.Name;
465461
}

0 commit comments

Comments
 (0)