aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-cov
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-09-29 16:46:47 +0000
committerDevang Patel <dpatel@apple.com>2011-09-29 16:46:47 +0000
commit7a50202be59b59416d2d42820e68b26ed78b3d0f (patch)
treef00f45dd97ff59ec2543c7ea221c0e76c1c406bc /tools/llvm-cov
parent9a7d48ae67d1f151d5339d37ce66c57179de77b4 (diff)
Cosmetic changes, as per Nick's review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-cov')
-rw-r--r--tools/llvm-cov/GCOVReader.cpp13
-rw-r--r--tools/llvm-cov/GCOVReader.h2
-rw-r--r--tools/llvm-cov/Makefile2
-rw-r--r--tools/llvm-cov/llvm-cov.cpp20
4 files changed, 16 insertions, 21 deletions
diff --git a/tools/llvm-cov/GCOVReader.cpp b/tools/llvm-cov/GCOVReader.cpp
index a8466cf601..cf01078462 100644
--- a/tools/llvm-cov/GCOVReader.cpp
+++ b/tools/llvm-cov/GCOVReader.cpp
@@ -10,12 +10,11 @@
// GCOVReader implements the interface to read coverage files that use 'gcov'
// format.
//
-//
//===----------------------------------------------------------------------===//
#include "GCOVReader.h"
-#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/OwningPtr.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MemoryObject.h"
#include "llvm/Support/system_error.h"
using namespace llvm;
@@ -35,16 +34,16 @@ bool GCOVFile::read(GCOVBuffer &Buffer) {
return false;
unsigned i = 0;
- while(1) {
+ while (1) {
GCOVFunction *GFun = NULL;
- if(Format == GCDA_402 || Format == GCDA_404) {
+ if (Format == GCDA_402 || Format == GCDA_404) {
if (i < Functions.size())
GFun = Functions[i];
} else
GFun = new GCOVFunction();
if (GFun && GFun->read(Buffer, Format)) {
- if(Format == GCNO_402 || Format == GCNO_404)
+ if (Format == GCNO_402 || Format == GCNO_404)
Functions.push_back(GFun);
}
else {
@@ -93,10 +92,10 @@ bool GCOVFunction::read(GCOVBuffer &Buff, GCOVFormat Format) {
Buff.readInt(); // Checksum #2
Name = Buff.readString();
- if(Format == GCNO_402 || Format == GCNO_404)
+ if (Format == GCNO_402 || Format == GCNO_404)
Filename = Buff.readString();
- if(Format == GCDA_402 || Format == GCDA_404) {
+ if (Format == GCDA_402 || Format == GCDA_404) {
Buff.readArcTag();
uint32_t Count = Buff.readInt() / 2;
for (unsigned i = 0, e = Count; i != e; ++i) {
diff --git a/tools/llvm-cov/GCOVReader.h b/tools/llvm-cov/GCOVReader.h
index 5dfc75f152..1e0807a03c 100644
--- a/tools/llvm-cov/GCOVReader.h
+++ b/tools/llvm-cov/GCOVReader.h
@@ -1,4 +1,4 @@
-//===-- tools/cov/GCOVReader.h - LLVM coverage tool -------------*- C++ -*-===//
+//===-- tools/llvm-cov/GCOVReader.h - LLVM coverage tool --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
diff --git a/tools/llvm-cov/Makefile b/tools/llvm-cov/Makefile
index 63696905f1..bd9fa2ad3d 100644
--- a/tools/llvm-cov/Makefile
+++ b/tools/llvm-cov/Makefile
@@ -1,4 +1,4 @@
-##===- tools/llvm-gcov/Makefile ----------------------------*- Makefile -*-===##
+##===- tools/llvm-cov/Makefile -----------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
diff --git a/tools/llvm-cov/llvm-cov.cpp b/tools/llvm-cov/llvm-cov.cpp
index 466deff766..0ecb28accb 100644
--- a/tools/llvm-cov/llvm-cov.cpp
+++ b/tools/llvm-cov/llvm-cov.cpp
@@ -7,10 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-//
// llvm-cov is a command line tools to analyze and report coverage information.
//
-//
//===----------------------------------------------------------------------===//
#include "GCOVReader.h"
@@ -47,27 +45,25 @@ int main(int argc, char **argv) {
if (InputGCNO.empty())
errs() << " " << argv[0] << ": No gcov input file!\n";
- OwningPtr<MemoryBuffer> Buff;
- if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputGCNO, Buff)) {
+ OwningPtr<MemoryBuffer> GCNO_Buff;
+ if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputGCNO, GCNO_Buff)) {
errs() << InputGCNO << ": " << ec.message() << "\n";
return 1;
}
- GCOVBuffer GB(Buff.take());
-
- if (!GF.read(GB)) {
+ GCOVBuffer GCNO_GB(GCNO_Buff.take());
+ if (!GF.read(GCNO_GB)) {
errs() << "Invalid .gcno File!\n";
return 1;
}
if (!InputGCDA.empty()) {
- OwningPtr<MemoryBuffer> Buff2;
- if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputGCDA, Buff2)) {
+ OwningPtr<MemoryBuffer> GCDA_Buff;
+ if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputGCDA, GCDA_Buff)) {
errs() << InputGCDA << ": " << ec.message() << "\n";
return 1;
}
- GCOVBuffer GB2(Buff2.take());
-
- if (!GF.read(GB2)) {
+ GCOVBuffer GCDA_GB(GCDA_Buff.take());
+ if (!GF.read(GCDA_GB)) {
errs() << "Invalid .gcda File!\n";
return 1;
}