diff options
author | Igor Kudrin <ikudrin@accesssoftek.com> | 2017-02-19 14:26:52 +0000 |
---|---|---|
committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2017-02-19 14:26:52 +0000 |
commit | 9e015dafbf9b092558138bdeb7c53a73315f555b (patch) | |
tree | 003574a745908047b56edf4683f1119c5ba0be24 /llvm/tools/llvm-cov/CodeCoverage.cpp | |
parent | b4460cf5a94fef0894a48a229e926de73becd176 (diff) | |
download | bcm5719-llvm-9e015dafbf9b092558138bdeb7c53a73315f555b.tar.gz bcm5719-llvm-9e015dafbf9b092558138bdeb7c53a73315f555b.zip |
[llvm-cov] Respect Windows line endings when parsing demangled symbols.
Differential Revision: https://reviews.llvm.org/D30096
llvm-svn: 295605
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r-- | llvm/tools/llvm-cov/CodeCoverage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index f3f6f9f7fed..781d1948ccd 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -451,7 +451,9 @@ void CodeCoverageTool::demangleSymbols(const CoverageMapping &Coverage) { // Cache the demangled names. unsigned I = 0; for (const auto &Function : Coverage.getCoveredFunctions()) - DC.DemangledNames[Function.Name] = Symbols[I++]; + // On Windows, lines in the demangler's output file end with "\r\n". + // Splitting by '\n' keeps '\r's, so cut them now. + DC.DemangledNames[Function.Name] = Symbols[I++].rtrim(); } void CodeCoverageTool::writeSourceFileView(StringRef SourceFile, |