diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-10-23 18:41:22 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-10-23 18:41:22 +0000 |
commit | dbeb64d2dad9ddd82d38e99d181ec111b2079faa (patch) | |
tree | c864c5f57c794bd4c44771546499ca661a97af2e /llvm/unittests/Support/FormatVariadicTest.cpp | |
parent | d66e0901aea59c485fb7e94652217842fadac267 (diff) | |
download | bcm5719-llvm-dbeb64d2dad9ddd82d38e99d181ec111b2079faa.tar.gz bcm5719-llvm-dbeb64d2dad9ddd82d38e99d181ec111b2079faa.zip |
Fix FormatVariadicTest with GCC
Looks like GCC didn't like the original specialization, try within namespace.
llvm-svn: 316361
Diffstat (limited to 'llvm/unittests/Support/FormatVariadicTest.cpp')
-rw-r--r-- | llvm/unittests/Support/FormatVariadicTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<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; |