tools: add support for decoding ARM attributes
[oota-llvm.git] / tools / llvm-readobj / StreamWriter.h
index 7771d71ef7b5626b03ce54159185db810de8f6e3..c40077a17994826f0332adf612ae9fd884e8241b 100644 (file)
@@ -172,6 +172,19 @@ public:
     startLine() << Label << ": " << int(Value) << "\n";
   }
 
+  template <typename T_>
+  void printList(StringRef Label, const SmallVectorImpl<T_> &List) {
+    startLine() << Label << ": [";
+    bool Comma = false;
+    for (unsigned LI = 0, LE = List.size(); LI != LE; ++LI) {
+      if (Comma)
+        OS << ", ";
+      OS << List[LI];
+      Comma = true;
+    }
+    OS << "]\n";
+  }
+
   template<typename T>
   void printHex(StringRef Label, T Value) {
     startLine() << Label << ": " << hex(Value) << "\n";