This is an archive of the discontinued LLVM Phabricator instance.

[llvm-cov] Respect Windows line endings when parsing demangled symbols
ClosedPublic

Authored by ikudrin on Feb 17 2017, 7:39 AM.

Details

Summary

When using a demangler on Windows, the output of llvm-cov might look like this:

  ------------------
: | int TemplateDemo<1>()
  |   10|      2|{

or like this (if it is stored into a file and then viewed in an editor):

  ------------------
  | int TemplateDemo<1>()
:
  |   10|      2|{

It results from splitting the demangler's output by \n, which keeps \r at the end of each symbol. This patch solves the issue by trimming strings of demangled symbols.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin created this revision.Feb 17 2017, 7:39 AM
vsk accepted this revision.Feb 17 2017, 10:34 AM

LGTM.

This revision is now accepted and ready to land.Feb 17 2017, 10:34 AM
This revision was automatically updated to reflect the committed changes.