[PATCH] D12181: [sanitizer] Add -fsanitize-trap-function.
Alexey Samsonov via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 20 15:14:06 PDT 2015
samsonov added a comment.
Overall, this looks reasonable to me, but I'd like Richard to confirm he's fine with this change as well.
================
Comment at: docs/UsersManual.rst:1121
@@ +1120,3 @@
+ Instruct code generator to emit a function call to the specified
+ function name instead of a trap instruction for checks configured to trap.
+
----------------
for sanitizer checks configured to trap.
================
Comment at: include/clang/Driver/Options.td:610
@@ -608,1 +609,3 @@
+ Flags<[CC1Option, CoreOption]>,
+ HelpText<"Make trapping sanitizers issue a call to specified function rather than a trap instruction">;
def fsanitize_undefined_trap_on_error : Flag<["-"], "fsanitize-undefined-trap-on-error">,
----------------
80 cols
================
Comment at: lib/CodeGen/CodeGenFunction.h:2895
@@ -2890,1 +2894,3 @@
+ /// \brief Create a basic block that will call the specified trap function,
+ /// and emit a conditional branch to it.
----------------
You can probably make this private
================
Comment at: lib/CodeGen/CodeGenFunction.h:2903
@@ -2894,1 +2902,3 @@
+ /// \brief Emit a call to trap or debugtrap and attach function attribute
+ /// "trap-func-name" if nonempty.
----------------
And this
http://reviews.llvm.org/D12181
More information about the cfe-commits
mailing list