diff --git a/llvm/include/llvm/Support/ScopedPrinter.h b/llvm/include/llvm/Support/ScopedPrinter.h index a08cc8fd31fd2..94080e85a9048 100644 --- a/llvm/include/llvm/Support/ScopedPrinter.h +++ b/llvm/include/llvm/Support/ScopedPrinter.h @@ -284,9 +284,11 @@ class LLVM_ABI ScopedPrinter { startLine() << Label << ": " << (Value ? "Yes" : "No") << '\n'; } - template void printVersion(StringRef Label, T... Version) { + template + void printVersion(StringRef Label, T MajorVersion, TArgs... MinorVersions) { startLine() << Label << ": "; - printVersionInternal(Version...); + getOStream() << MajorVersion; + ((getOStream() << '.' << MinorVersions), ...); getOStream() << "\n"; } @@ -454,16 +456,6 @@ class LLVM_ABI ScopedPrinter { virtual raw_ostream &getOStream() { return OS; } private: - template void printVersionInternal(T Value) { - getOStream() << Value; - } - - template - void printVersionInternal(S Value, T Value2, TArgs... Args) { - getOStream() << Value << "."; - printVersionInternal(Value2, Args...); - } - static bool flagName(const FlagEntry &LHS, const FlagEntry &RHS) { return LHS.Name < RHS.Name; }