diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-22 23:19:32 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-22 23:19:32 +0000 |
commit | f3601388f234f70778e3023018dfe57b64cf4043 (patch) | |
tree | 5d81ed7335aeb630770576e369a2ebec10557120 /lib/Driver/Driver.cpp | |
parent | e663c720063fc9ff9f75bcbe38cd070c73c78b0e (diff) |
Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index dbe7bd9b68..c7eaad338c 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -711,6 +711,11 @@ void Driver::BuildActions(const ArgList &Args, ActionList &Actions) const { // Add a link action if necessary. if (!LinkerInputs.empty()) Actions.push_back(new LinkJobAction(LinkerInputs, types::TY_Image)); + + // If we are linking, claim any options which are obviously only used for + // compilation. + if (FinalPhase == phases::Link) + Args.ClaimAllArgs(options::OPT_CompileOnly_Group); } Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase, |