mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
llvm-cov: Add support for gcov's --long-file-names option
GCOV provides an option to prepend output file names with the source file name, to disambiguate between covered data that's included from multiple sources. Add a flag to llvm-cov that does the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207035 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -39,6 +39,10 @@ static cl::opt<bool> BranchCount("c", cl::Grouping, cl::init(false),
|
||||
"of percentages (requires -b)"));
|
||||
static cl::alias BranchCountA("branch-counts", cl::aliasopt(BranchCount));
|
||||
|
||||
static cl::opt<bool> LongNames("l", cl::Grouping, cl::init(false),
|
||||
cl::desc("Prefix filenames with the main file"));
|
||||
static cl::alias LongNamesA("long-file-names", cl::aliasopt(LongNames));
|
||||
|
||||
static cl::opt<bool> FuncSummary("f", cl::Grouping, cl::init(false),
|
||||
cl::desc("Show coverage for each function"));
|
||||
static cl::alias FuncSummaryA("function-summaries", cl::aliasopt(FuncSummary));
|
||||
@ -126,9 +130,9 @@ int main(int argc, char **argv) {
|
||||
GF.dump();
|
||||
|
||||
GCOVOptions Options(AllBlocks, BranchProb, BranchCount, FuncSummary,
|
||||
PreservePaths, UncondBranch);
|
||||
PreservePaths, UncondBranch, LongNames);
|
||||
FileInfo FI(Options);
|
||||
GF.collectLineCounts(FI);
|
||||
FI.print(InputGCNO, InputGCDA);
|
||||
FI.print(SourceFile, InputGCNO, InputGCDA);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user