[llvm] r316361 - Fix FormatVariadicTest with GCC

Jonas Hahnfeld via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 11:41:22 PDT 2017


Author: hahnfeld
Date: Mon Oct 23 11:41:22 2017
New Revision: 316361

URL: http://llvm.org/viewvc/llvm-project?rev=316361&view=rev
Log:
Fix FormatVariadicTest with GCC

Looks like GCC didn't like the original specialization, try within namespace.

Modified:
    llvm/trunk/unittests/Support/FormatVariadicTest.cpp

Modified: llvm/trunk/unittests/Support/FormatVariadicTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/FormatVariadicTest.cpp?rev=316361&r1=316360&r2=316361&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/FormatVariadicTest.cpp (original)
+++ llvm/trunk/unittests/Support/FormatVariadicTest.cpp Mon Oct 23 11:41:22 2017
@@ -593,11 +593,13 @@ struct Recorder {
       : Copied(Move.Copied), Moved(1 + Move.Moved) {}
 };
 } // namespace
-template <> struct llvm::format_provider<Recorder> {
+namespace llvm {
+template <> struct format_provider<Recorder> {
   static void format(const Recorder &R, raw_ostream &OS, StringRef style) {
     OS << R.Copied << "C " << R.Moved << "M";
   }
 };
+} // namespace
 
 TEST(FormatVariadicTest, CopiesAndMoves) {
   Recorder R;




More information about the llvm-commits mailing list