Index: lib/Target/Hexagon/RDFGraph.h =================================================================== --- lib/Target/Hexagon/RDFGraph.h +++ lib/Target/Hexagon/RDFGraph.h @@ -924,10 +924,6 @@ return MM; } - template struct Print; - template - raw_ostream &operator<< (raw_ostream &OS, const Print &P); - template struct Print { Print(const T &x, const DataFlowGraph &g) : Obj(x), G(g) {} @@ -942,6 +938,44 @@ : Print>(x, g) {} }; + template + raw_ostream &operator<< (raw_ostream &OS, const Print &P) = delete; + + // Explicit specializations in RDFGraph.cpp. There is an additional explicit + // specialization in RDFLiveness.cpp; it is declared in RDFLiveness.h. + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print> &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + } // end namespace rdf } // end namespace llvm Index: lib/Target/Hexagon/RDFLiveness.h =================================================================== --- lib/Target/Hexagon/RDFLiveness.h +++ lib/Target/Hexagon/RDFLiveness.h @@ -142,6 +142,10 @@ unsigned Nest, unsigned MaxNest); }; + // Explicit specialization in RDFLiveness.cpp; primary template in RDFGraph.h. + template<> + raw_ostream &operator<< (raw_ostream &OS, const Print &P); + } // end namespace rdf } // end namespace llvm