[Clang FE] Recognize -mnop-mcount CL option (SystemZ only).
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 5 Nov 2019 10:44:04 +0000 (11:44 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 5 Nov 2019 11:12:36 +0000 (12:12 +0100)
commit93767143147b7d765c6ce8123a4226d449228649
tree9dce938a812260c09251f76a0bfba110c4d532f4
parent646896a442249380f74ff404e6dd26687f3dc6d9
[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
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Basic/DiagnosticCommonKinds.td
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/mnop-mcount.c [new file with mode: 0644]