From dbeb64d2dad9ddd82d38e99d181ec111b2079faa Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Mon, 23 Oct 2017 18:41:22 +0000 Subject: Fix FormatVariadicTest with GCC Looks like GCC didn't like the original specialization, try within namespace. llvm-svn: 316361 --- llvm/unittests/Support/FormatVariadicTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/unittests/Support/FormatVariadicTest.cpp') diff --git a/llvm/unittests/Support/FormatVariadicTest.cpp b/llvm/unittests/Support/FormatVariadicTest.cpp index a6ce37e014f..ddecffdeed1 100644 --- a/llvm/unittests/Support/FormatVariadicTest.cpp +++ b/llvm/unittests/Support/FormatVariadicTest.cpp @@ -593,11 +593,13 @@ struct Recorder { : Copied(Move.Copied), Moved(1 + Move.Moved) {} }; } // namespace -template <> struct llvm::format_provider { +namespace llvm { +template <> struct format_provider { static void format(const Recorder &R, raw_ostream &OS, StringRef style) { OS << R.Copied << "C " << R.Moved << "M"; } }; +} // namespace TEST(FormatVariadicTest, CopiesAndMoves) { Recorder R; -- cgit v1.2.3