forked from OSchip/llvm-project
parent
11d4ebe224
commit
3fdaa244e1
|
@ -16,15 +16,11 @@
|
||||||
#include "llvm/Support/GCOV.h"
|
#include "llvm/Support/GCOV.h"
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
#include "llvm/Support/MemoryObject.h"
|
#include "llvm/Support/MemoryObject.h"
|
||||||
#include "llvm/Support/Path.h"
|
|
||||||
#include "llvm/Support/PrettyStackTrace.h"
|
#include "llvm/Support/PrettyStackTrace.h"
|
||||||
#include "llvm/Support/Signals.h"
|
#include "llvm/Support/Signals.h"
|
||||||
#include "llvm/Support/system_error.h"
|
#include "llvm/Support/system_error.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static cl::opt<std::string>
|
|
||||||
InputFilename(cl::Positional, cl::desc("source filename"), cl::init(""));
|
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
DumpGCOV("dump", cl::init(false), cl::desc("dump gcov file"));
|
DumpGCOV("dump", cl::init(false), cl::desc("dump gcov file"));
|
||||||
|
|
||||||
|
@ -44,23 +40,6 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
cl::ParseCommandLineOptions(argc, argv, "llvm cov\n");
|
cl::ParseCommandLineOptions(argc, argv, "llvm cov\n");
|
||||||
|
|
||||||
if (InputFilename.empty()) {
|
|
||||||
// FIXME: Error out here.
|
|
||||||
}
|
|
||||||
|
|
||||||
sys::Path SrcFile(InputFilename);
|
|
||||||
|
|
||||||
sys::Path GCNOFile(SrcFile);
|
|
||||||
GCNOFile.eraseSuffix();
|
|
||||||
GCNOFile.appendSuffix(".gcno");
|
|
||||||
|
|
||||||
sys::Path GCDAFile(SrcFile);
|
|
||||||
GCDAFile.eraseSuffix();
|
|
||||||
GCDAFile.appendSuffix(".gcda");
|
|
||||||
|
|
||||||
sys::Path OutputFile(SrcFile);
|
|
||||||
OutputFile.appendSuffix(".gcov");
|
|
||||||
|
|
||||||
GCOVFile GF;
|
GCOVFile GF;
|
||||||
if (InputGCNO.empty())
|
if (InputGCNO.empty())
|
||||||
errs() << " " << argv[0] << ": No gcov input file!\n";
|
errs() << " " << argv[0] << ": No gcov input file!\n";
|
||||||
|
|
Loading…
Reference in New Issue