[llvm] 06d4257 - [RDF] Add operator<<(raw_ostream&, RegisterAggr), NFC
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 4 16:41:47 PDT 2020
Author: Krzysztof Parzyszek
Date: 2020-08-04T18:40:07-05:00
New Revision: 06d425737bd2953cbea319b5f1d4419b54870e6c
URL: https://github.com/llvm/llvm-project/commit/06d425737bd2953cbea319b5f1d4419b54870e6c
DIFF: https://github.com/llvm/llvm-project/commit/06d425737bd2953cbea319b5f1d4419b54870e6c.diff
LOG: [RDF] Add operator<<(raw_ostream&, RegisterAggr), NFC
Added:
Modified:
llvm/include/llvm/CodeGen/RDFRegisters.h
llvm/lib/CodeGen/RDFRegisters.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/RDFRegisters.h b/llvm/include/llvm/CodeGen/RDFRegisters.h
index abeab62af3fa..98b92036e1ed 100644
--- a/llvm/include/llvm/CodeGen/RDFRegisters.h
+++ b/llvm/include/llvm/CodeGen/RDFRegisters.h
@@ -258,6 +258,8 @@ namespace rdf {
LaneBitmask Mask;
};
raw_ostream &operator<< (raw_ostream &OS, const PrintLaneMaskOpt &P);
+
+ raw_ostream &operator<< (raw_ostream &OS, const RegisterAggr &A);
} // end namespace rdf
} // end namespace llvm
diff --git a/llvm/lib/CodeGen/RDFRegisters.cpp b/llvm/lib/CodeGen/RDFRegisters.cpp
index c76447d95444..6c2c889ba64a 100644
--- a/llvm/lib/CodeGen/RDFRegisters.cpp
+++ b/llvm/lib/CodeGen/RDFRegisters.cpp
@@ -374,3 +374,8 @@ RegisterAggr::rr_iterator::rr_iterator(const RegisterAggr &RG,
Pos = End ? Masks.end() : Masks.begin();
Index = End ? Masks.size() : 0;
}
+
+raw_ostream &rdf::operator<<(raw_ostream &OS, const RegisterAggr &A) {
+ A.print(OS);
+ return OS;
+}
More information about the llvm-commits
mailing list