blob: 6c57b622b8d2ba0eba1789c017f5eb376aa1887b [file] [log] [blame]
Nick Lewycky3fdcc6f2010-12-31 17:31:54 +00001//===--- ArgList.cpp - Argument List Management ---------------------------===//
Daniel Dunbar6ac1e222009-03-04 17:10:42 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "clang/Driver/ArgList.h"
11#include "clang/Driver/Arg.h"
Daniel Dunbar03e8ab22010-05-20 16:54:55 +000012#include "clang/Driver/DriverDiagnostic.h"
Daniel Dunbar9358dc82009-03-04 22:40:08 +000013#include "clang/Driver/Option.h"
Daniel Dunbar16484af2009-09-09 22:32:26 +000014#include "llvm/ADT/SmallString.h"
15#include "llvm/ADT/Twine.h"
16#include "llvm/Support/raw_ostream.h"
17
Benjamin Kramera5ddbca2010-05-21 19:58:44 +000018using namespace clang;
Daniel Dunbar6ac1e222009-03-04 17:10:42 +000019using namespace clang::driver;
20
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +000021void arg_iterator::SkipToNextArg() {
22 for (; Current != Args.end(); ++Current) {
23 // Done if there are no filters.
24 if (!Id0.isValid())
25 break;
26
27 // Otherwise require a match.
28 const Option &O = (*Current)->getOption();
29 if (O.matches(Id0) ||
30 (Id1.isValid() && O.matches(Id1)) ||
31 (Id2.isValid() && O.matches(Id2)))
32 break;
33 }
34}
35
36//
37
Daniel Dunbar3612bc82010-06-11 22:00:22 +000038ArgList::ArgList() {
Daniel Dunbar6ac1e222009-03-04 17:10:42 +000039}
40
41ArgList::~ArgList() {
Daniel Dunbar6ac1e222009-03-04 17:10:42 +000042}
Daniel Dunbar9358dc82009-03-04 22:40:08 +000043
44void ArgList::append(Arg *A) {
Daniel Dunbar9358dc82009-03-04 22:40:08 +000045 Args.push_back(A);
46}
Daniel Dunbard8cadd42009-03-12 01:36:44 +000047
Chad Rosier2b819102011-08-02 17:58:04 +000048void ArgList::eraseArg(OptSpecifier Id) {
Chad Rosieraec8f452011-08-08 17:17:15 +000049 for (iterator it = begin(), ie = end(); it != ie; ) {
Chad Rosier2b819102011-08-02 17:58:04 +000050 if ((*it)->getOption().matches(Id)) {
Chad Rosieraec8f452011-08-08 17:17:15 +000051 it = Args.erase(it);
Chad Rosierb18d5032011-08-12 23:38:19 +000052 ie = end();
Chad Rosier30601782011-08-17 23:08:45 +000053 } else {
Chad Rosieraec8f452011-08-08 17:17:15 +000054 ++it;
Chad Rosier30601782011-08-17 23:08:45 +000055 }
Chad Rosier2b819102011-08-02 17:58:04 +000056 }
57}
58
Daniel Dunbar9e1f9822009-11-19 04:14:53 +000059Arg *ArgList::getLastArgNoClaim(OptSpecifier Id) const {
Daniel Dunbard8cadd42009-03-12 01:36:44 +000060 // FIXME: Make search efficient?
Daniel Dunbare4bdae72009-11-19 04:00:53 +000061 for (const_reverse_iterator it = rbegin(), ie = rend(); it != ie; ++it)
62 if ((*it)->getOption().matches(Id))
Daniel Dunbar0c562a22009-03-12 16:03:38 +000063 return *it;
Daniel Dunbar0c562a22009-03-12 16:03:38 +000064 return 0;
Daniel Dunbard8cadd42009-03-12 01:36:44 +000065}
Daniel Dunbarbca58cb2009-03-12 18:20:18 +000066
Daniel Dunbar9e1f9822009-11-19 04:14:53 +000067Arg *ArgList::getLastArg(OptSpecifier Id) const {
Rafael Espindola592f2412010-12-20 22:45:09 +000068 Arg *Res = 0;
69 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
70 if ((*it)->getOption().matches(Id)) {
71 Res = *it;
72 Res->claim();
73 }
74 }
75
76 return Res;
Daniel Dunbare4bdae72009-11-19 04:00:53 +000077}
78
Daniel Dunbar9e1f9822009-11-19 04:14:53 +000079Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1) const {
Daniel Dunbarfdbe65e2010-06-14 20:20:44 +000080 Arg *Res = 0;
Rafael Espindola592f2412010-12-20 22:45:09 +000081 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
Daniel Dunbarfdbe65e2010-06-14 20:20:44 +000082 if ((*it)->getOption().matches(Id0) ||
83 (*it)->getOption().matches(Id1)) {
84 Res = *it;
Rafael Espindola592f2412010-12-20 22:45:09 +000085 Res->claim();
Daniel Dunbarfdbe65e2010-06-14 20:20:44 +000086 }
87 }
Daniel Dunbarcd4e1862009-03-17 18:51:42 +000088
Daniel Dunbarcd4e1862009-03-17 18:51:42 +000089 return Res;
90}
91
Daniel Dunbar9e1f9822009-11-19 04:14:53 +000092Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
93 OptSpecifier Id2) const {
Bill Wendling45483f72009-06-28 07:36:13 +000094 Arg *Res = 0;
Rafael Espindola592f2412010-12-20 22:45:09 +000095 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
Daniel Dunbarfdbe65e2010-06-14 20:20:44 +000096 if ((*it)->getOption().matches(Id0) ||
97 (*it)->getOption().matches(Id1) ||
98 (*it)->getOption().matches(Id2)) {
99 Res = *it;
Rafael Espindola592f2412010-12-20 22:45:09 +0000100 Res->claim();
Daniel Dunbarfdbe65e2010-06-14 20:20:44 +0000101 }
Bill Wendling45483f72009-06-28 07:36:13 +0000102 }
103
Bill Wendling45483f72009-06-28 07:36:13 +0000104 return Res;
105}
106
Daniel Dunbar47e879d2010-07-13 23:31:40 +0000107Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
108 OptSpecifier Id2, OptSpecifier Id3) const {
109 Arg *Res = 0;
Rafael Espindola592f2412010-12-20 22:45:09 +0000110 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
Daniel Dunbar47e879d2010-07-13 23:31:40 +0000111 if ((*it)->getOption().matches(Id0) ||
112 (*it)->getOption().matches(Id1) ||
113 (*it)->getOption().matches(Id2) ||
114 (*it)->getOption().matches(Id3)) {
115 Res = *it;
Rafael Espindola592f2412010-12-20 22:45:09 +0000116 Res->claim();
Daniel Dunbar47e879d2010-07-13 23:31:40 +0000117 }
118 }
119
Daniel Dunbar47e879d2010-07-13 23:31:40 +0000120 return Res;
121}
122
Chandler Carruthabf07a72012-01-02 14:19:45 +0000123Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
124 OptSpecifier Id2, OptSpecifier Id3,
125 OptSpecifier Id4) const {
126 Arg *Res = 0;
127 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
128 if ((*it)->getOption().matches(Id0) ||
129 (*it)->getOption().matches(Id1) ||
130 (*it)->getOption().matches(Id2) ||
131 (*it)->getOption().matches(Id3) ||
132 (*it)->getOption().matches(Id4)) {
133 Res = *it;
134 Res->claim();
135 }
136 }
137
138 return Res;
139}
140
Simon Atanasyan003ab662012-05-29 18:50:33 +0000141Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
142 OptSpecifier Id2, OptSpecifier Id3,
143 OptSpecifier Id4, OptSpecifier Id5) const {
144 Arg *Res = 0;
145 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
146 if ((*it)->getOption().matches(Id0) ||
147 (*it)->getOption().matches(Id1) ||
148 (*it)->getOption().matches(Id2) ||
149 (*it)->getOption().matches(Id3) ||
150 (*it)->getOption().matches(Id4) ||
151 (*it)->getOption().matches(Id5)) {
152 Res = *it;
153 Res->claim();
154 }
155 }
156
157 return Res;
158}
159
160Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
161 OptSpecifier Id2, OptSpecifier Id3,
162 OptSpecifier Id4, OptSpecifier Id5,
163 OptSpecifier Id6) const {
164 Arg *Res = 0;
165 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
166 if ((*it)->getOption().matches(Id0) ||
167 (*it)->getOption().matches(Id1) ||
168 (*it)->getOption().matches(Id2) ||
169 (*it)->getOption().matches(Id3) ||
170 (*it)->getOption().matches(Id4) ||
171 (*it)->getOption().matches(Id5) ||
172 (*it)->getOption().matches(Id6)) {
173 Res = *it;
174 Res->claim();
175 }
176 }
177
178 return Res;
179}
180
181Arg *ArgList::getLastArg(OptSpecifier Id0, OptSpecifier Id1,
182 OptSpecifier Id2, OptSpecifier Id3,
183 OptSpecifier Id4, OptSpecifier Id5,
184 OptSpecifier Id6, OptSpecifier Id7) const {
185 Arg *Res = 0;
186 for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
187 if ((*it)->getOption().matches(Id0) ||
188 (*it)->getOption().matches(Id1) ||
189 (*it)->getOption().matches(Id2) ||
190 (*it)->getOption().matches(Id3) ||
191 (*it)->getOption().matches(Id4) ||
192 (*it)->getOption().matches(Id5) ||
193 (*it)->getOption().matches(Id6) ||
194 (*it)->getOption().matches(Id7)) {
195 Res = *it;
196 Res->claim();
197 }
198 }
199
200 return Res;
201}
202
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000203bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default) const {
Daniel Dunbar9af66682009-04-07 21:08:57 +0000204 if (Arg *A = getLastArg(Pos, Neg))
205 return A->getOption().matches(Pos);
Daniel Dunbar18a7f332009-03-18 09:29:36 +0000206 return Default;
207}
208
Chris Lattner5f9e2722011-07-23 10:55:15 +0000209StringRef ArgList::getLastArgValue(OptSpecifier Id,
210 StringRef Default) const {
Daniel Dunbar03e8ab22010-05-20 16:54:55 +0000211 if (Arg *A = getLastArg(Id))
Richard Smith1d489cf2012-11-01 04:30:05 +0000212 return A->getValue();
Daniel Dunbar03e8ab22010-05-20 16:54:55 +0000213 return Default;
214}
215
216int ArgList::getLastArgIntValue(OptSpecifier Id, int Default,
Chad Rosier2dec85b2012-03-13 20:09:56 +0000217 clang::DiagnosticsEngine *Diags) const {
Daniel Dunbar03e8ab22010-05-20 16:54:55 +0000218 int Res = Default;
219
220 if (Arg *A = getLastArg(Id)) {
Richard Smith1d489cf2012-11-01 04:30:05 +0000221 if (StringRef(A->getValue()).getAsInteger(10, Res)) {
Chad Rosier2dec85b2012-03-13 20:09:56 +0000222 if (Diags)
223 Diags->Report(diag::err_drv_invalid_int_value)
Richard Smith1d489cf2012-11-01 04:30:05 +0000224 << A->getAsString(*this) << A->getValue();
Chad Rosier2dec85b2012-03-13 20:09:56 +0000225 }
Daniel Dunbar03e8ab22010-05-20 16:54:55 +0000226 }
227
228 return Res;
229}
230
231std::vector<std::string> ArgList::getAllArgValues(OptSpecifier Id) const {
Chris Lattner5f9e2722011-07-23 10:55:15 +0000232 SmallVector<const char *, 16> Values;
Daniel Dunbar03e8ab22010-05-20 16:54:55 +0000233 AddAllArgValues(Values, Id);
234 return std::vector<std::string>(Values.begin(), Values.end());
235}
236
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000237void ArgList::AddLastArg(ArgStringList &Output, OptSpecifier Id) const {
Daniel Dunbar18a7f332009-03-18 09:29:36 +0000238 if (Arg *A = getLastArg(Id)) {
239 A->claim();
240 A->render(*this, Output);
241 }
242}
243
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000244void ArgList::AddAllArgs(ArgStringList &Output, OptSpecifier Id0,
245 OptSpecifier Id1, OptSpecifier Id2) const {
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000246 for (arg_iterator it = filtered_begin(Id0, Id1, Id2),
247 ie = filtered_end(); it != ie; ++it) {
Daniel Dunbar7e4953e2010-06-11 22:00:13 +0000248 (*it)->claim();
249 (*it)->render(*this, Output);
Daniel Dunbar18a7f332009-03-18 09:29:36 +0000250 }
251}
Daniel Dunbaree510312009-03-20 15:59:01 +0000252
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000253void ArgList::AddAllArgValues(ArgStringList &Output, OptSpecifier Id0,
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000254 OptSpecifier Id1, OptSpecifier Id2) const {
255 for (arg_iterator it = filtered_begin(Id0, Id1, Id2),
256 ie = filtered_end(); it != ie; ++it) {
Daniel Dunbar7e4953e2010-06-11 22:00:13 +0000257 (*it)->claim();
258 for (unsigned i = 0, e = (*it)->getNumValues(); i != e; ++i)
Richard Smith1d489cf2012-11-01 04:30:05 +0000259 Output.push_back((*it)->getValue(i));
Daniel Dunbaree510312009-03-20 15:59:01 +0000260 }
261}
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000262
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000263void ArgList::AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0,
Daniel Dunbar4df9a662009-04-26 01:07:52 +0000264 const char *Translation,
265 bool Joined) const {
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000266 for (arg_iterator it = filtered_begin(Id0),
267 ie = filtered_end(); it != ie; ++it) {
Daniel Dunbar7e4953e2010-06-11 22:00:13 +0000268 (*it)->claim();
Daniel Dunbar4df9a662009-04-26 01:07:52 +0000269
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000270 if (Joined) {
Chris Lattner5f9e2722011-07-23 10:55:15 +0000271 Output.push_back(MakeArgString(StringRef(Translation) +
Richard Smith1d489cf2012-11-01 04:30:05 +0000272 (*it)->getValue(0)));
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000273 } else {
274 Output.push_back(Translation);
Richard Smith1d489cf2012-11-01 04:30:05 +0000275 Output.push_back((*it)->getValue(0));
Daniel Dunbar524b9fb2009-03-26 15:39:22 +0000276 }
277 }
278}
279
Daniel Dunbar9e1f9822009-11-19 04:14:53 +0000280void ArgList::ClaimAllArgs(OptSpecifier Id0) const {
Daniel Dunbar3b84f5b2009-11-25 11:33:30 +0000281 for (arg_iterator it = filtered_begin(Id0),
282 ie = filtered_end(); it != ie; ++it)
Daniel Dunbar7e4953e2010-06-11 22:00:13 +0000283 (*it)->claim();
Daniel Dunbar68fb4692009-04-03 20:51:31 +0000284}
285
Chad Rosier2b819102011-08-02 17:58:04 +0000286void ArgList::ClaimAllArgs() const {
287 for (const_iterator it = begin(), ie = end(); it != ie; ++it)
288 if (!(*it)->isClaimed())
289 (*it)->claim();
290}
291
Chris Lattner5f9e2722011-07-23 10:55:15 +0000292const char *ArgList::MakeArgString(const Twine &T) const {
Dylan Noblesmithf7ccbad2012-02-05 02:13:05 +0000293 SmallString<256> Str;
Daniel Dunbar16484af2009-09-09 22:32:26 +0000294 T.toVector(Str);
295 return MakeArgString(Str.str());
296}
297
Daniel Dunbar312a8b72010-06-09 18:49:38 +0000298const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000299 StringRef LHS,
300 StringRef RHS) const {
301 StringRef Cur = getArgString(Index);
Daniel Dunbar312a8b72010-06-09 18:49:38 +0000302 if (Cur.size() == LHS.size() + RHS.size() &&
303 Cur.startswith(LHS) && Cur.endswith(RHS))
304 return Cur.data();
305
306 return MakeArgString(LHS + RHS);
307}
308
Chad Rosier649aa6a2013-02-21 18:40:49 +0000309void ArgList::dump() {
310 llvm::errs() << "ArgList:";
311 for (iterator it = begin(), ie = end(); it != ie; ++it) {
312 llvm::errs() << " " << (*it)->getSpelling();
313 }
314 llvm::errs() << "\n";
315}
316
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000317//
318
Axel Naumann9d520c52010-10-11 09:18:43 +0000319InputArgList::InputArgList(const char* const *ArgBegin,
320 const char* const *ArgEnd)
Daniel Dunbar3612bc82010-06-11 22:00:22 +0000321 : NumInputArgStrings(ArgEnd - ArgBegin) {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000322 ArgStrings.append(ArgBegin, ArgEnd);
323}
324
325InputArgList::~InputArgList() {
326 // An InputArgList always owns its arguments.
327 for (iterator it = begin(), ie = end(); it != ie; ++it)
328 delete *it;
329}
330
Chris Lattner5f9e2722011-07-23 10:55:15 +0000331unsigned InputArgList::MakeIndex(StringRef String0) const {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000332 unsigned Index = ArgStrings.size();
333
334 // Tuck away so we have a reliable const char *.
335 SynthesizedStrings.push_back(String0);
336 ArgStrings.push_back(SynthesizedStrings.back().c_str());
337
338 return Index;
339}
340
Chris Lattner5f9e2722011-07-23 10:55:15 +0000341unsigned InputArgList::MakeIndex(StringRef String0,
342 StringRef String1) const {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000343 unsigned Index0 = MakeIndex(String0);
344 unsigned Index1 = MakeIndex(String1);
345 assert(Index0 + 1 == Index1 && "Unexpected non-consecutive indices!");
346 (void) Index1;
347 return Index0;
348}
349
Chris Lattner5f9e2722011-07-23 10:55:15 +0000350const char *InputArgList::MakeArgString(StringRef Str) const {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000351 return getArgString(MakeIndex(Str));
352}
353
354//
355
Daniel Dunbar279c1db2010-06-11 22:00:26 +0000356DerivedArgList::DerivedArgList(const InputArgList &_BaseArgs)
Daniel Dunbar3612bc82010-06-11 22:00:22 +0000357 : BaseArgs(_BaseArgs) {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000358}
359
360DerivedArgList::~DerivedArgList() {
361 // We only own the arguments we explicitly synthesized.
Mike Stump1eb44332009-09-09 15:08:12 +0000362 for (iterator it = SynthesizedArgs.begin(), ie = SynthesizedArgs.end();
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000363 it != ie; ++it)
364 delete *it;
365}
366
Chris Lattner5f9e2722011-07-23 10:55:15 +0000367const char *DerivedArgList::MakeArgString(StringRef Str) const {
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000368 return BaseArgs.MakeArgString(Str);
369}
370
Michael J. Spencere4151c52012-10-19 22:36:40 +0000371Arg *DerivedArgList::MakeFlagArg(const Arg *BaseArg, const Option Opt) const {
Michael J. Spencerc6357102012-10-22 22:13:48 +0000372 Arg *A = new Arg(Opt, ArgList::MakeArgString(Twine(Opt.getPrefix()) +
373 Twine(Opt.getName())),
374 BaseArgs.MakeIndex(Opt.getName()), BaseArg);
Daniel Dunbarfd48cb32010-03-11 18:04:53 +0000375 SynthesizedArgs.push_back(A);
376 return A;
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000377}
378
Michael J. Spencere4151c52012-10-19 22:36:40 +0000379Arg *DerivedArgList::MakePositionalArg(const Arg *BaseArg, const Option Opt,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000380 StringRef Value) const {
Daniel Dunbar4465a772010-06-09 22:31:00 +0000381 unsigned Index = BaseArgs.MakeIndex(Value);
Michael J. Spencerc6357102012-10-22 22:13:48 +0000382 Arg *A = new Arg(Opt, ArgList::MakeArgString(Twine(Opt.getPrefix()) +
383 Twine(Opt.getName())),
384 Index, BaseArgs.getArgString(Index), BaseArg);
Daniel Dunbarfd48cb32010-03-11 18:04:53 +0000385 SynthesizedArgs.push_back(A);
386 return A;
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000387}
388
Michael J. Spencere4151c52012-10-19 22:36:40 +0000389Arg *DerivedArgList::MakeSeparateArg(const Arg *BaseArg, const Option Opt,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000390 StringRef Value) const {
Michael J. Spencere4151c52012-10-19 22:36:40 +0000391 unsigned Index = BaseArgs.MakeIndex(Opt.getName(), Value);
Michael J. Spencerc6357102012-10-22 22:13:48 +0000392 Arg *A = new Arg(Opt, ArgList::MakeArgString(Twine(Opt.getPrefix()) +
393 Twine(Opt.getName())),
394 Index, BaseArgs.getArgString(Index + 1), BaseArg);
Daniel Dunbarfd48cb32010-03-11 18:04:53 +0000395 SynthesizedArgs.push_back(A);
396 return A;
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000397}
398
Michael J. Spencere4151c52012-10-19 22:36:40 +0000399Arg *DerivedArgList::MakeJoinedArg(const Arg *BaseArg, const Option Opt,
Chris Lattner5f9e2722011-07-23 10:55:15 +0000400 StringRef Value) const {
Michael J. Spencere4151c52012-10-19 22:36:40 +0000401 unsigned Index = BaseArgs.MakeIndex(Opt.getName().str() + Value.str());
Michael J. Spencerc6357102012-10-22 22:13:48 +0000402 Arg *A = new Arg(Opt, ArgList::MakeArgString(Twine(Opt.getPrefix()) +
403 Twine(Opt.getName())), Index,
Michael J. Spencere4151c52012-10-19 22:36:40 +0000404 BaseArgs.getArgString(Index) + Opt.getName().size(),
Daniel Dunbar532c1ec2010-06-09 22:31:08 +0000405 BaseArg);
Daniel Dunbarfd48cb32010-03-11 18:04:53 +0000406 SynthesizedArgs.push_back(A);
407 return A;
Daniel Dunbarf3cad362009-03-25 04:13:45 +0000408}