Add classof implementations to the raw_ostream classes.
[oota-llvm.git] / include / llvm / MC / MCLinkerOptimizationHint.h
index 890d6385aacde34ce3cd369018f283fe5e171554..8c0813b6b0a6af52310281c1837ecb22c1c2ad39 100644 (file)
@@ -140,8 +140,12 @@ public:
       uint64_t current_pos() const override { return Count; }
 
     public:
-      raw_counting_ostream() : Count(0) {}
+      raw_counting_ostream() : raw_ostream(SK_COUNTING), Count(0) {}
       ~raw_counting_ostream() { flush(); }
+
+      static bool classof(const raw_ostream *OS) {
+        return OS->getKind() == SK_COUNTING;
+      }
     };
 
     raw_counting_ostream OutStream;