Граф коммитов

28 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar 3b84f5bab9 Add an arg_iterator, for iterating over a subset of arguments in an ArgList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-25 11:33:30 +00:00
Daniel Dunbar 9e1f98260a Driver: Introduce OptSpecifier class for protecting access to an option id.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 04:14:53 +00:00
Daniel Dunbar e4bdae78c6 Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 04:00:53 +00:00
Daniel Dunbar 16484afe5c StringRefize ArgList construction of ArgStrings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 22:32:26 +00:00
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Bill Wendling 45483f7a1b Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-28 07:36:13 +00:00
Daniel Dunbar 4df9a664b7 Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26 01:07:52 +00:00
Daniel Dunbar 9af6668984 Driver: Add default for ArgList::hasFlag and simplify implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 21:08:57 +00:00
Daniel Dunbar 68fb469aeb Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-03 20:51:31 +00:00
Daniel Dunbar 776dbd8b0e Driver: Unbreak ArgList::hasFlag.
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
   hooked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 18:13:26 +00:00
Daniel Dunbar 478edc295e Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-29 22:29:05 +00:00
Daniel Dunbar 524b9fb545 Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 15:39:22 +00:00
Daniel Dunbar f3cad36e59 Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.
 
 - This is not a great decomposition, but it does embed the
   translation into the type system, and keep things efficient for
   tool chains that don't want to do any translation.

 - No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-25 04:13:45 +00:00
Daniel Dunbar fe2e04a979 Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
    -O optimization option wins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 17:31:30 +00:00
Daniel Dunbar b0c4df5c4d Driver: Implement 'missing argument' error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 23:26:43 +00:00
Daniel Dunbar ee51031c37 Driver: Add two option overload for AddAllArgValues.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 15:59:01 +00:00
Daniel Dunbar 18a7f33af8 Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
   forwarding all arguments matching a certain set of options to the
   tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 09:29:36 +00:00
Daniel Dunbar ec504fdfef Driver: Fix typo ArgList destructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 20:44:29 +00:00
Daniel Dunbar cd4e186cdc Driver: Add two option form of ArgList::getLastArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 18:51:42 +00:00
Daniel Dunbar 3494bb1e01 Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
   is primarily a list of arguments; we want to allow clients to still
   add argument strings to an ArgList to avoid worrying about string
   lifetimes (or unnecessary string copying).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 17:51:18 +00:00
Daniel Dunbar 8022fd46d4 Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-15 00:48:16 +00:00
Daniel Dunbar c0dfd53634 Driver: Fix think in ArgList::MakeIndex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:25:24 +00:00
Daniel Dunbar bca58cb510 Driver: Add ArgList support for synthesizing arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:20:18 +00:00
Daniel Dunbar 0c562a23a6 Driver: Add ArgList::getLastArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 16:03:38 +00:00
Daniel Dunbar e7fffa14dc Driver: Fix thinko in Arg::hasArg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66785 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 08:45:11 +00:00
Daniel Dunbar d8cadd4f25 Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 01:36:44 +00:00
Daniel Dunbar 9358dc8d1e Driver: Add ArgList::{append, getArgString}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 22:40:08 +00:00
Daniel Dunbar 6ac1e2252b Driver: Add ArgList implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 17:10:42 +00:00