[clang] [CodeGen] -fsanitize=alignment: add cl::opt sanitize-alignment-builtin to disable memcpy instrumentation (PR #69240)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 18 12:59:31 PDT 2023
================
@@ -66,6 +66,11 @@ using namespace clang;
using namespace CodeGen;
using namespace llvm;
+static llvm::cl::opt<bool> ClSanitizeAlignmentBuiltin(
+ "sanitize-alignment-builtin", llvm::cl::Hidden,
+ llvm::cl::desc("Instrument builtin functions for -fsanitize=alignment"),
+ llvm::cl::init(true));
+
----------------
zygoloid wrote:
Why are you using a `cl::opt` here rather than a proper `CodeGenOption`? We generally don't use `cl::opt` in clang and want our options to be provided via our option structs instead, so that clang can be used as a library.
https://github.com/llvm/llvm-project/pull/69240
More information about the cfe-commits
mailing list