diff options
author | Fangrui Song <maskray@google.com> | 2020-01-04 16:58:11 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-01-10 09:57:39 -0800 |
commit | f17ae668a96eeb69f0664f126cf672e1a05754d2 (patch) | |
tree | 6d63004713914e91e9f07fecec32233cac4be725 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | a44c434b68e515ce9f2627367c83ff6b22328261 (diff) | |
download | llvm-f17ae668a96eeb69f0664f126cf672e1a05754d2.zip llvm-f17ae668a96eeb69f0664f126cf672e1a05754d2.tar.gz llvm-f17ae668a96eeb69f0664f126cf672e1a05754d2.tar.bz2 |
[Driver][CodeGen] Add -fpatchable-function-entry=N[,0]
In the backend, this feature is implemented with the function attribute
"patchable-function-entry". Both the attribute and XRay use
TargetOpcode::PATCHABLE_FUNCTION_ENTER, so the two features are
incompatible.
Reviewed By: ostannard, MaskRay
Differential Revision: https://reviews.llvm.org/D72222
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 6f6f43c..c184113 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1101,6 +1101,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, parseXRayInstrumentationBundle("-fxray-instrumentation-bundle=", A, Args, Diags, Opts.XRayInstrumentationBundle); + Opts.PatchableFunctionEntryCount = + getLastArgIntValue(Args, OPT_fpatchable_function_entry_EQ, 0, Diags); Opts.InstrumentForProfiling = Args.hasArg(OPT_pg); Opts.CallFEntry = Args.hasArg(OPT_mfentry); Opts.MNopMCount = Args.hasArg(OPT_mnop_mcount); |