9
9
#ifndef LLVM_OPTION_ARGLIST_H
10
10
#define LLVM_OPTION_ARGLIST_H
11
11
12
+ #include " llvm/Support/Compiler.h"
12
13
#include " llvm/ADT/ArrayRef.h"
13
14
#include " llvm/ADT/DenseMap.h"
14
15
#include " llvm/ADT/iterator_range.h"
@@ -139,7 +140,7 @@ class ArgList {
139
140
140
141
// / Get the range of indexes in which options with the specified IDs might
141
142
// / reside, or (0, 0) if there are no such options.
142
- OptRange getRange (std::initializer_list<OptSpecifier> Ids) const ;
143
+ LLVM_ABI OptRange getRange (std::initializer_list<OptSpecifier> Ids) const ;
143
144
144
145
protected:
145
146
// Make the default special members protected so they won't be used to slice
@@ -178,7 +179,7 @@ class ArgList {
178
179
// / @{
179
180
180
181
// / append - Append \p A to the arg list.
181
- void append (Arg *A);
182
+ LLVM_ABI void append (Arg *A);
182
183
183
184
const arglist_type &getArgs () const { return Args; }
184
185
@@ -227,7 +228,7 @@ class ArgList {
227
228
// / @{
228
229
229
230
// / eraseArg - Remove any option matching \p Id.
230
- void eraseArg (OptSpecifier Id);
231
+ LLVM_ABI void eraseArg (OptSpecifier Id);
231
232
232
233
// / @}
233
234
// / @name Arg Access
@@ -284,11 +285,11 @@ class ArgList {
284
285
// / @{
285
286
286
287
// / getLastArgValue - Return the value of the last argument, or a default.
287
- StringRef getLastArgValue (OptSpecifier Id, StringRef Default = " " ) const ;
288
+ LLVM_ABI StringRef getLastArgValue (OptSpecifier Id, StringRef Default = " " ) const ;
288
289
289
290
// / getAllArgValues - Get the values of all instances of the given argument
290
291
// / as strings.
291
- std::vector<std::string> getAllArgValues (OptSpecifier Id) const ;
292
+ LLVM_ABI std::vector<std::string> getAllArgValues (OptSpecifier Id) const ;
292
293
293
294
// / @}
294
295
// / @name Translation Utilities
@@ -298,19 +299,19 @@ class ArgList {
298
299
// / true if the option is present, false if the negation is present, and
299
300
// / \p Default if neither option is given. If both the option and its
300
301
// / negation are present, the last one wins.
301
- bool hasFlag (OptSpecifier Pos, OptSpecifier Neg, bool Default) const ;
302
- bool hasFlagNoClaim (OptSpecifier Pos, OptSpecifier Neg, bool Default) const ;
302
+ LLVM_ABI bool hasFlag (OptSpecifier Pos, OptSpecifier Neg, bool Default) const ;
303
+ LLVM_ABI bool hasFlagNoClaim (OptSpecifier Pos, OptSpecifier Neg, bool Default) const ;
303
304
304
305
// / hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative
305
306
// / form \p Neg, return true if the option or its alias is present, false if
306
307
// / the negation is present, and \p Default if none of the options are
307
308
// / given. If multiple options are present, the last one wins.
308
- bool hasFlag (OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
309
+ LLVM_ABI bool hasFlag (OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
309
310
bool Default) const ;
310
311
311
312
// / Given an option Pos and its negative form Neg, render the option if Pos is
312
313
// / present.
313
- void addOptInFlag (ArgStringList &Output, OptSpecifier Pos,
314
+ LLVM_ABI void addOptInFlag (ArgStringList &Output, OptSpecifier Pos,
314
315
OptSpecifier Neg) const ;
315
316
// / Render the option if Neg is present.
316
317
void addOptOutFlag (ArgStringList &Output, OptSpecifier Pos,
@@ -331,17 +332,17 @@ class ArgList {
331
332
332
333
// / AddAllArgsExcept - Render all arguments matching any of the given ids
333
334
// / and not matching any of the excluded ids.
334
- void AddAllArgsExcept (ArgStringList &Output, ArrayRef<OptSpecifier> Ids,
335
+ LLVM_ABI void AddAllArgsExcept (ArgStringList &Output, ArrayRef<OptSpecifier> Ids,
335
336
ArrayRef<OptSpecifier> ExcludeIds) const ;
336
337
// / Render all arguments matching any of the given ids.
337
- void addAllArgs (ArgStringList &Output, ArrayRef<OptSpecifier> Ids) const ;
338
+ LLVM_ABI void addAllArgs (ArgStringList &Output, ArrayRef<OptSpecifier> Ids) const ;
338
339
339
340
// / AddAllArgs - Render all arguments matching the given ids.
340
- void AddAllArgs (ArgStringList &Output, OptSpecifier Id0) const ;
341
+ LLVM_ABI void AddAllArgs (ArgStringList &Output, OptSpecifier Id0) const ;
341
342
342
343
// / AddAllArgValues - Render the argument values of all arguments
343
344
// / matching the given ids.
344
- void AddAllArgValues (ArgStringList &Output, OptSpecifier Id0,
345
+ LLVM_ABI void AddAllArgValues (ArgStringList &Output, OptSpecifier Id0,
345
346
OptSpecifier Id1 = 0U , OptSpecifier Id2 = 0U ) const ;
346
347
347
348
// / AddAllArgsTranslated - Render all the arguments matching the
@@ -350,13 +351,13 @@ class ArgList {
350
351
// /
351
352
// / \param Joined - If true, render the argument as joined with
352
353
// / the option specifier.
353
- void AddAllArgsTranslated (ArgStringList &Output, OptSpecifier Id0,
354
+ LLVM_ABI void AddAllArgsTranslated (ArgStringList &Output, OptSpecifier Id0,
354
355
const char *Translation,
355
356
bool Joined = false ) const ;
356
357
357
358
// / ClaimAllArgs - Claim all arguments which match the given
358
359
// / option id.
359
- void ClaimAllArgs (OptSpecifier Id0) const ;
360
+ LLVM_ABI void ClaimAllArgs (OptSpecifier Id0) const ;
360
361
361
362
template <typename ... OptSpecifiers>
362
363
void claimAllArgs (OptSpecifiers... Ids) const {
@@ -366,7 +367,7 @@ class ArgList {
366
367
367
368
// / ClaimAllArgs - Claim all arguments.
368
369
// /
369
- void ClaimAllArgs () const ;
370
+ LLVM_ABI void ClaimAllArgs () const ;
370
371
// / @}
371
372
// / @name Arg Synthesis
372
373
// / @{
@@ -381,16 +382,16 @@ class ArgList {
381
382
382
383
// / Create an arg string for (\p LHS + \p RHS), reusing the
383
384
// / string at \p Index if possible.
384
- const char *GetOrMakeJoinedArgString (unsigned Index, StringRef LHS,
385
+ LLVM_ABI const char *GetOrMakeJoinedArgString (unsigned Index, StringRef LHS,
385
386
StringRef RHS) const ;
386
387
387
- void print (raw_ostream &O) const ;
388
- void dump () const ;
388
+ LLVM_ABI void print (raw_ostream &O) const ;
389
+ LLVM_ABI void dump () const ;
389
390
390
391
// / @}
391
392
};
392
393
393
- class InputArgList final : public ArgList {
394
+ class LLVM_ABI InputArgList final : public ArgList {
394
395
private:
395
396
// / List of argument strings used by the contained Args.
396
397
// /
@@ -463,7 +464,7 @@ class InputArgList final : public ArgList {
463
464
464
465
// / DerivedArgList - An ordered collection of driver arguments,
465
466
// / whose storage may be in another argument list.
466
- class DerivedArgList final : public ArgList {
467
+ class LLVM_ABI DerivedArgList final : public ArgList {
467
468
const InputArgList &BaseArgs;
468
469
469
470
// / The list of arguments we synthesized.
0 commit comments