diff options
author | Joey Gouly <joey.gouly@arm.com> | 2012-11-23 10:39:49 +0000 |
---|---|---|
committer | Joey Gouly <joey.gouly@arm.com> | 2012-11-23 10:39:49 +0000 |
commit | 85489080807b47b70d26611ba543801e16bec4cd (patch) | |
tree | 56667df8f6d4774ce20329cee27463000aa89836 /lib/Driver/Tools.cpp | |
parent | 66b8a6671bb5df540dd7200a5286f7ed7a72c1cc (diff) |
PR14306: Move -fbounds-checking to -fsanitize=bounds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index fcf9d6b390..eb79c2fb88 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1479,6 +1479,10 @@ SanitizerArgs::SanitizerArgs(const Driver &D, const ArgList &Args) { Add = parse(D, *I); } else if ((*I)->getOption().matches(options::OPT_fno_sanitize_EQ)) { Remove = parse(D, *I); + } else if ((*I)->getOption().matches(options::OPT_fbounds_checking) || + (*I)->getOption().matches(options::OPT_fbounds_checking_EQ)) { + Add = Bounds; + DeprecatedReplacement = "-fsanitize=bounds"; } else { continue; } @@ -2372,14 +2376,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-Wlarge-by-value-copy=64"); // default value } - if (Arg *A = Args.getLastArg(options::OPT_fbounds_checking, - options::OPT_fbounds_checking_EQ)) { - if (A->getNumValues()) { - StringRef val = A->getValue(); - CmdArgs.push_back(Args.MakeArgString("-fbounds-checking=" + val)); - } else - CmdArgs.push_back("-fbounds-checking=1"); - } if (Args.hasArg(options::OPT_relocatable_pch)) CmdArgs.push_back("-relocatable-pch"); |