[PATCH] D72222: [Driver][CodeGen] Add -fpatchable-function-entry=N[,M]
Oliver Stannard (Linaro) via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 6 06:47:00 PST 2020
ostannard added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:77
"invalid unwind library name in argument '%0'">;
+def err_drv_incompatible_options : Error<"'%0' and '%1' cannot be used together">;
def err_drv_incompatible_unwindlib : Error<
----------------
We already have `err_drv_argument_not_allowed_with`, which can be used instead of adding this.
================
Comment at: clang/include/clang/Driver/Options.td:1703
HelpText<"Recognize and construct Pascal-style string literals">;
+def fpatchable_function_entry : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>,
+ HelpText<"Generate N NOPs at function entry">;
----------------
Names of options with an equals sign end in `_EQ`.
================
Comment at: clang/test/Driver/fpatchable-function-entry.c:11
+// RUN: not %clang -target i386 -fsyntax-only %s -fpatchable-function-entry=1,1 2>&1 | FileCheck --check-prefix=NONZERO %s
+// NONZERO: error: the clang compiler does not support '1'
+
----------------
I think we should have a more descriptive message here, maybe something like:
error: the second parameter of '-fpatchable-function-entry=' must be '0' or omitted
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72222/new/
https://reviews.llvm.org/D72222
More information about the cfe-commits
mailing list