[llvm-readobj/ELF] Dump DT_VERDEF/DT_VERDEFNUM correctly.
[oota-llvm.git] / tools / llvm-readobj / StreamWriter.h
index f3cc57ef940e77b5cf2aa3ee0d08916c80a4b8cc..9e88edc5a1ef350fc7b8e604a4d3fac22fa28afc 100644 (file)
@@ -194,6 +194,19 @@ public:
     OS << "]\n";
   }
 
+  template <typename T>
+  void printHexList(StringRef Label, const T &List) {
+    startLine() << Label << ": [";
+    bool Comma = false;
+    for (const auto &Item : List) {
+      if (Comma)
+        OS << ", ";
+      OS << hex(Item);
+      Comma = true;
+    }
+    OS << "]\n";
+  }
+
   template<typename T>
   void printHex(StringRef Label, T Value) {
     startLine() << Label << ": " << hex(Value) << "\n";