1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/unittests/CodeGen/GlobalISel/GISelMITest.cpp
Matt Arsenault 2ae7a6c247 GlobalISel: Improve gtest usage
Don't unnecessarily use ASSERT_*, and print the MachineFunction
on failure.

llvm-svn: 353072
2019-02-04 18:58:27 +00:00

31 lines
750 B
C++

//===------------------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "GISelMITest.h"
namespace llvm {
std::ostream &
operator<<(std::ostream &OS, const LLT Ty) {
std::string Repr;
raw_string_ostream SS{Repr};
Ty.print(SS);
OS << SS.str();
return OS;
}
std::ostream &
operator<<(std::ostream &OS, const MachineFunction &MF) {
std::string Repr;
raw_string_ostream SS{Repr};
MF.print(SS);
OS << SS.str();
return OS;
}
}