[llvm] r295227 - [IR] Accept 'const Type &' in the Type operator<<. NFC.
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 12:38:22 PST 2017
Author: ab
Date: Wed Feb 15 14:38:22 2017
New Revision: 295227
URL: http://llvm.org/viewvc/llvm-project?rev=295227&view=rev
Log:
[IR] Accept 'const Type &' in the Type operator<<. NFC.
Type::print is const; there's no reason for the operator not to be.
Modified:
llvm/trunk/include/llvm/IR/Type.h
Modified: llvm/trunk/include/llvm/IR/Type.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Type.h?rev=295227&r1=295226&r2=295227&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Type.h (original)
+++ llvm/trunk/include/llvm/IR/Type.h Wed Feb 15 14:38:22 2017
@@ -423,7 +423,7 @@ private:
};
// Printing of types.
-static inline raw_ostream &operator<<(raw_ostream &OS, Type &T) {
+static inline raw_ostream &operator<<(raw_ostream &OS, const Type &T) {
T.print(OS);
return OS;
}
More information about the llvm-commits
mailing list