Fix FormatVariadicTest with GCC

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

llvm-svn: 316361
This commit is contained in:
Jonas Hahnfeld 2017-10-23 18:41:22 +00:00
parent 572038831c
commit 53ea4fe72d

View File

@ -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;