Add classof implementations to the raw_ostream classes.
[oota-llvm.git] / include / llvm / Support / raw_os_ostream.h
index 04cf3b6202c439dadaaf82e07cc7c15eacb25006..e41cc71026ff34a1df6ddb6cd0bd6e2db8749921 100644 (file)
@@ -33,8 +33,11 @@ class raw_os_ostream : public raw_ostream {
   uint64_t current_pos() const override;
 
 public:
-  raw_os_ostream(std::ostream &O) : OS(O) {}
+  raw_os_ostream(std::ostream &O) : raw_ostream(SK_STD_OS), OS(O) {}
   ~raw_os_ostream();
+  static bool classof(const raw_ostream *OS) {
+    return OS->getKind() == SK_STD_OS;
+  }
 };
 
 } // end llvm namespace