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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 10:24:07 PST 2018


Test case?

On Mon, Feb 12, 2018 at 1:13 PM Adrian Prantl via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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() << '"';
>    }
>  }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180220/88483c01/attachment.html>


More information about the llvm-commits mailing list