diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-06-09 22:31:04 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-06-09 22:31:04 +0000 |
commit | e375c4a02ac6e18b166a067b8226e15a1ab009e7 (patch) | |
tree | 0933ab42af9a43bf4e31873d3378455f4aebfc44 /lib/Driver/Option.cpp | |
parent | 4465a776a56de81211ae4672e5782c6bef075135 (diff) |
Driver: Keep the rendering style in the option, instead of as part of the Arg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Option.cpp')
-rw-r--r-- | lib/Driver/Option.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/Driver/Option.cpp b/lib/Driver/Option.cpp index ea3b3bc418..6bcaf524d2 100644 --- a/lib/Driver/Option.cpp +++ b/lib/Driver/Option.cpp @@ -20,7 +20,6 @@ Option::Option(OptionClass _Kind, OptSpecifier _ID, const char *_Name, const OptionGroup *_Group, const Option *_Alias) : Kind(_Kind), ID(_ID.getID()), Name(_Name), Group(_Group), Alias(_Alias), Unsupported(false), LinkerInput(false), NoOptAsInput(false), - ForceSeparateRender(false), ForceJoinedRender(false), DriverOption(false), NoArgumentUnused(false) { // Multi-level aliases are not supported, and alias options cannot @@ -28,6 +27,31 @@ Option::Option(OptionClass _Kind, OptSpecifier _ID, const char *_Name, // inherent limitation. assert((!Alias || (!Alias->Alias && !Group)) && "Multi-level aliases and aliases with groups are unsupported."); + + // Initialize rendering options based on the class. + switch (Kind) { + case GroupClass: + case InputClass: + case UnknownClass: + RenderStyle = RenderValuesStyle; + break; + + case JoinedClass: + case JoinedAndSeparateClass: + RenderStyle = RenderJoinedStyle; + break; + + case CommaJoinedClass: + RenderStyle = RenderCommaJoinedStyle; + break; + + case FlagClass: + case SeparateClass: + case MultiArgClass: + case JoinedOrSeparateClass: + RenderStyle = RenderSeparateStyle; + break; + } } Option::~Option() { |