summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCalixte Denizet <cdenizet@mozilla.com>2018-11-12 09:12:27 +0000
committerCalixte Denizet <cdenizet@mozilla.com>2018-11-12 09:12:27 +0000
commitcedcc73d932f7092842e0c80e1321f6ae6b0ee63 (patch)
treea16927cc001d539e96535df3ccf0d81ce1854b60 /clang/lib/Frontend/CompilerInvocation.cpp
parentc6fabeac11b909f2c9f05a78c820e691a5bd693c (diff)
downloadbcm5719-llvm-cedcc73d932f7092842e0c80e1321f6ae6b0ee63.tar.gz
bcm5719-llvm-cedcc73d932f7092842e0c80e1321f6ae6b0ee63.zip
[Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov
Summary: These options are taking regex separated by colons to filter files. - if both are empty then all files are instrumented - if -fprofile-filter-files is empty then all the filenames matching any of the regex from exclude are not instrumented - if -fprofile-exclude-files is empty then all the filenames matching any of the regex from filter are instrumented - if both aren't empty then all the filenames which match any of the regex in filter and which don't match all the regex in filter are instrumented - this patch is a follow-up of https://reviews.llvm.org/D52033 Reviewers: marco-c, vsk Reviewed By: marco-c, vsk Subscribers: cfe-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D52034 llvm-svn: 346642
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 7be183f9701..d43965ce5df 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -811,6 +811,10 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.CoverageExtraChecksum = Args.hasArg(OPT_coverage_cfg_checksum);
Opts.CoverageNoFunctionNamesInData =
Args.hasArg(OPT_coverage_no_function_names_in_data);
+ Opts.ProfileFilterFiles =
+ Args.getLastArgValue(OPT_fprofile_filter_files_EQ);
+ Opts.ProfileExcludeFiles =
+ Args.getLastArgValue(OPT_fprofile_exclude_files_EQ);
Opts.CoverageExitBlockBeforeBody =
Args.hasArg(OPT_coverage_exit_block_before_body);
if (Args.hasArg(OPT_coverage_version_EQ)) {
OpenPOWER on IntegriCloud