Fix the syntax highlighting of strings in dwarfdump.
authorAdrian Prantl <aprantl@apple.com>
Mon, 12 Feb 2018 21:11:23 +0000 (21:11 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 12 Feb 2018 21:11:23 +0000 (21:11 +0000)
llvm-svn: 324936

llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp

index b2adab7..1f00dec 100644 (file)
@@ -587,10 +587,10 @@ void DWARFFormValue::dump(raw_ostream &OS, DIDumpOptions DumpOpts) const {
 void DWARFFormValue::dumpString(raw_ostream &OS) const {
   Optional<const char *> DbgStr = getAsCString();
   if (DbgStr.hasValue()) {
-    raw_ostream &COS = WithColor(OS, syntax::String);
-    COS << '"';
-    COS.write_escaped(DbgStr.getValue());
-    COS << '"';
+    auto COS = WithColor(OS, syntax::String);
+    COS.get() << '"';
+    COS.get().write_escaped(DbgStr.getValue());
+    COS.get() << '"';
   }
 }