diff options
author | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-05-04 08:08:37 +0000 |
---|---|---|
committer | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-05-04 08:08:37 +0000 |
commit | 2e4fd6d9a1c8ba9c400324d230cfc49050550dea (patch) | |
tree | e0ea844061ca943577e7aa3f4ca31a344614f5d7 /lib/Driver | |
parent | fd00eecad6fa5400cf37269d84361a0551d0e6d3 (diff) | |
download | clang-2e4fd6d9a1c8ba9c400324d230cfc49050550dea.tar.gz |
Fix -Wlarge-by-value-copy option handling in the driver.
CC1 supports only the joined format.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver')
-rw-r--r-- | lib/Driver/Tools.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 9448425a42..90a9f0cf94 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -2018,11 +2018,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Arg *A = Args.getLastArg(options::OPT_Wlarge_by_value_copy_EQ, options::OPT_Wlarge_by_value_copy_def)) { - CmdArgs.push_back("-Wlarge-by-value-copy"); - if (A->getNumValues()) - CmdArgs.push_back(A->getValue(Args)); - else - CmdArgs.push_back("64"); // default value for -Wlarge-by-value-copy. + if (A->getNumValues()) { + StringRef bytes = A->getValue(Args); + CmdArgs.push_back(Args.MakeArgString("-Wlarge-by-value-copy=" + bytes)); + } else + CmdArgs.push_back("-Wlarge-by-value-copy=64"); // default value } if (Args.hasArg(options::OPT__relocatable_pch)) |