summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-11-05 11:44:04 +0100
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-11-05 12:12:36 +0100
commit93767143147b7d765c6ce8123a4226d449228649 (patch)
tree9dce938a812260c09251f76a0bfba110c4d532f4 /clang/lib/Frontend/CompilerInvocation.cpp
parent646896a442249380f74ff404e6dd26687f3dc6d9 (diff)
downloadbcm5719-llvm-93767143147b7d765c6ce8123a4226d449228649.tar.gz
bcm5719-llvm-93767143147b7d765c6ce8123a4226d449228649.zip
[Clang FE] Recognize -mnop-mcount CL option (SystemZ only).
Recognize -mnop-mcount from the command line and add a function attribute "mnop-mcount"="true" when passed. When this option is used, a nop is added instead of a call to fentry. This is used when building the Linux Kernel. If this option is passed for any other target than SystemZ, an error is generated. Review: Ulrich Weigand https://reviews.llvm.org/D67763
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index c935ce5ebab..46a7e39770a 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1103,6 +1103,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.InstrumentForProfiling = Args.hasArg(OPT_pg);
Opts.CallFEntry = Args.hasArg(OPT_mfentry);
+ Opts.MNopMCount = Args.hasArg(OPT_mnop_mcount);
Opts.EmitOpenCLArgMetadata = Args.hasArg(OPT_cl_kernel_arg_info);
if (const Arg *A = Args.getLastArg(OPT_fcf_protection_EQ)) {
OpenPOWER on IntegriCloud