diff options
author | Dan Liew <dliew@apple.com> | 2021-02-12 16:10:33 -0800 |
---|---|---|
committer | Dan Liew <dliew@apple.com> | 2021-02-25 13:24:50 -0800 |
commit | 7b1d2a2891d812ffc1bb08712143c79e457acbd4 (patch) | |
tree | bff08a156603a9b57c9e95ba7208a96b8c66cca3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 493210117785c348dcbbf7fc3615020ee81d2c9d (diff) | |
download | llvm-7b1d2a2891d812ffc1bb08712143c79e457acbd4.zip llvm-7b1d2a2891d812ffc1bb08712143c79e457acbd4.tar.gz llvm-7b1d2a2891d812ffc1bb08712143c79e457acbd4.tar.bz2 |
[NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor-kind=` flag.
This change simplifies `clang/lib/Frontend/CompilerInvocation.cpp`
because we no longer need to manually parse the flag and set codegen
options in the frontend. However, we still need to manually parse the
flag in the driver because:
* The marshalling infrastructure doesn't operate there.
* We need to do some platform specific checks in the driver
that will likely never be supported by any kind of marshalling
infrastructure.
rdar://71609176
Differential Revision: https://reviews.llvm.org/D97327
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 12dbd45..eb44754 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1937,19 +1937,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.EmitVersionIdentMetadata = Args.hasFlag(OPT_Qy, OPT_Qn, true); - if (LangOptsRef.Sanitize.has(SanitizerKind::Address)) { - if (Arg *A = - Args.getLastArg(options::OPT_sanitize_address_destructor_kind_EQ)) { - auto destructorKind = AsanDtorKindFromString(A->getValue()); - if (destructorKind == llvm::AsanDtorKind::Invalid) { - Diags.Report(clang::diag::err_drv_unsupported_option_argument) - << A->getOption().getName() << A->getValue(); - } else { - Opts.setSanitizeAddressDtorKind(destructorKind); - } - } - } - if (Args.hasArg(options::OPT_ffinite_loops)) Opts.FiniteLoops = CodeGenOptions::FiniteLoopsKind::Always; else if (Args.hasArg(options::OPT_fno_finite_loops)) |