[llvm-commits] [llvm] r140785 - in /llvm/trunk: lib/VMCore/PassRegistry.cpp tools/llvm-cov/GCOVReader.cpp tools/llvm-cov/GCOVReader.h tools/llvm-cov/Makefile tools/llvm-cov/llvm-cov.cpp
Devang Patel
dpatel at apple.com
Thu Sep 29 09:46:48 PDT 2011
Author: dpatel
Date: Thu Sep 29 11:46:47 2011
New Revision: 140785
URL: http://llvm.org/viewvc/llvm-project?rev=140785&view=rev
Log:
Cosmetic changes, as per Nick's review.
Modified:
llvm/trunk/lib/VMCore/PassRegistry.cpp
llvm/trunk/tools/llvm-cov/GCOVReader.cpp
llvm/trunk/tools/llvm-cov/GCOVReader.h
llvm/trunk/tools/llvm-cov/Makefile
llvm/trunk/tools/llvm-cov/llvm-cov.cpp
Modified: llvm/trunk/lib/VMCore/PassRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassRegistry.cpp?rev=140785&r1=140784&r2=140785&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/PassRegistry.cpp (original)
+++ llvm/trunk/lib/VMCore/PassRegistry.cpp Thu Sep 29 11:46:47 2011
@@ -20,6 +20,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
+#include "llvm/Function.h"
#include <vector>
using namespace llvm;
Modified: llvm/trunk/tools/llvm-cov/GCOVReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/GCOVReader.cpp?rev=140785&r1=140784&r2=140785&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/GCOVReader.cpp (original)
+++ llvm/trunk/tools/llvm-cov/GCOVReader.cpp Thu Sep 29 11:46:47 2011
@@ -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 @@
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 @@
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) {
Modified: llvm/trunk/tools/llvm-cov/GCOVReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/GCOVReader.h?rev=140785&r1=140784&r2=140785&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/GCOVReader.h (original)
+++ llvm/trunk/tools/llvm-cov/GCOVReader.h Thu Sep 29 11:46:47 2011
@@ -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
//
Modified: llvm/trunk/tools/llvm-cov/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/Makefile?rev=140785&r1=140784&r2=140785&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/Makefile (original)
+++ llvm/trunk/tools/llvm-cov/Makefile Thu Sep 29 11:46:47 2011
@@ -1,4 +1,4 @@
-##===- tools/llvm-gcov/Makefile ----------------------------*- Makefile -*-===##
+##===- tools/llvm-cov/Makefile -----------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
Modified: llvm/trunk/tools/llvm-cov/llvm-cov.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/llvm-cov.cpp?rev=140785&r1=140784&r2=140785&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/llvm-cov.cpp (original)
+++ llvm/trunk/tools/llvm-cov/llvm-cov.cpp Thu Sep 29 11:46:47 2011
@@ -7,10 +7,8 @@
//
//===----------------------------------------------------------------------===//
//
-//
// llvm-cov is a command line tools to analyze and report coverage information.
//
-//
//===----------------------------------------------------------------------===//
#include "GCOVReader.h"
@@ -47,27 +45,25 @@
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;
}
More information about the llvm-commits
mailing list