[llvm] r277170 - [GlobalISel] Add LLT raw_ostream operator<< overload.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 09:56:13 PDT 2016


Author: ab
Date: Fri Jul 29 11:56:12 2016
New Revision: 277170

URL: http://llvm.org/viewvc/llvm-project?rev=277170&view=rev
Log:
[GlobalISel] Add LLT raw_ostream operator<< overload.

Helpful when debugging; will be used in the following commit.

Modified:
    llvm/trunk/include/llvm/CodeGen/LowLevelType.h

Modified: llvm/trunk/include/llvm/CodeGen/LowLevelType.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LowLevelType.h?rev=277170&r1=277169&r2=277170&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LowLevelType.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LowLevelType.h Fri Jul 29 11:56:12 2016
@@ -179,6 +179,11 @@ private:
   TypeKind Kind;
 };
 
+inline raw_ostream& operator<<(raw_ostream &OS, const LLT &Ty) {
+  Ty.print(OS);
+  return OS;
+}
+
 template<> struct DenseMapInfo<LLT> {
   static inline LLT getEmptyKey() {
     return LLT{LLT::Invalid, 0, -1u};




More information about the llvm-commits mailing list