[llvm] r324936 - Fix the syntax highlighting of strings in dwarfdump.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 13:11:24 PST 2018


Author: adrian
Date: Mon Feb 12 13:11:23 2018
New Revision: 324936

URL: http://llvm.org/viewvc/llvm-project?rev=324936&view=rev
Log:
Fix the syntax highlighting of strings in dwarfdump.

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp?rev=324936&r1=324935&r2=324936&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp Mon Feb 12 13:11:23 2018
@@ -587,10 +587,10 @@ void DWARFFormValue::dump(raw_ostream &O
 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() << '"';
   }
 }
 




More information about the llvm-commits mailing list