summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/GCOV.cpp
diff options
context:
space:
mode:
authorYuchen Wu <yuchenericwu@hotmail.com>2013-11-05 01:56:29 +0000
committerYuchen Wu <yuchenericwu@hotmail.com>2013-11-05 01:56:29 +0000
commite68c5f82421b4a9365f1d3f2768537538d45ece9 (patch)
tree125a516c5e51bfff53e1ca4ab56f6b99338296f4 /llvm/lib/IR/GCOV.cpp
parentf3e653e9a6c7ef079174146480d899b99bd487ae (diff)
downloadbcm5719-llvm-e68c5f82421b4a9365f1d3f2768537538d45ece9.tar.gz
bcm5719-llvm-e68c5f82421b4a9365f1d3f2768537538d45ece9.zip
Revert "llvm-cov: Added command-line option to change dir."
This reverts commit d8acf0078cf363252727acff00f85ae8074f95b3. llvm-svn: 194040
Diffstat (limited to 'llvm/lib/IR/GCOV.cpp')
-rw-r--r--llvm/lib/IR/GCOV.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/IR/GCOV.cpp
index 9f4b5367e19..a33da2a5525 100644
--- a/llvm/lib/IR/GCOV.cpp
+++ b/llvm/lib/IR/GCOV.cpp
@@ -266,20 +266,18 @@ void FileInfo::print(raw_fd_ostream &OS, StringRef gcnoFile,
for (StringMap<LineCounts>::iterator I = LineInfo.begin(), E = LineInfo.end();
I != E; ++I) {
StringRef Filename = I->first();
- OwningPtr<MemoryBuffer> Buff;
- if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
- errs() << Filename << ": " << ec.message() << "\n";
- return;
- }
- StringRef AllLines = Buff.take()->getBuffer();
-
OS << " -: 0:Source:" << Filename << "\n";
OS << " -: 0:Graph:" << gcnoFile << "\n";
OS << " -: 0:Data:" << gcdaFile << "\n";
OS << " -: 0:Runs:" << RunCount << "\n";
OS << " -: 0:Programs:" << ProgramCount << "\n";
-
LineCounts &L = LineInfo[Filename];
+ OwningPtr<MemoryBuffer> Buff;
+ if (error_code ec = MemoryBuffer::getFileOrSTDIN(Filename, Buff)) {
+ errs() << Filename << ": " << ec.message() << "\n";
+ return;
+ }
+ StringRef AllLines = Buff.take()->getBuffer();
uint32_t i = 0;
while (!AllLines.empty()) {
if (L.find(i) != L.end()) {
OpenPOWER on IntegriCloud