99#ifndef LLVM_OPTION_ARGLIST_H
1010#define LLVM_OPTION_ARGLIST_H
1111
12+ #include " llvm/Support/Compiler.h"
1213#include " llvm/ADT/ArrayRef.h"
1314#include " llvm/ADT/DenseMap.h"
1415#include " llvm/ADT/iterator_range.h"
@@ -139,7 +140,7 @@ class ArgList {
139140
140141 // / Get the range of indexes in which options with the specified IDs might
141142 // / 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 ;
143144
144145protected:
145146 // Make the default special members protected so they won't be used to slice
@@ -178,7 +179,7 @@ class ArgList {
178179 // / @{
179180
180181 // / append - Append \p A to the arg list.
181- void append (Arg *A);
182+ LLVM_ABI void append (Arg *A);
182183
183184 const arglist_type &getArgs () const { return Args; }
184185
@@ -227,7 +228,7 @@ class ArgList {
227228 // / @{
228229
229230 // / eraseArg - Remove any option matching \p Id.
230- void eraseArg (OptSpecifier Id);
231+ LLVM_ABI void eraseArg (OptSpecifier Id);
231232
232233 // / @}
233234 // / @name Arg Access
@@ -284,11 +285,11 @@ class ArgList {
284285 // / @{
285286
286287 // / 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 ;
288289
289290 // / getAllArgValues - Get the values of all instances of the given argument
290291 // / as strings.
291- std::vector<std::string> getAllArgValues (OptSpecifier Id) const ;
292+ LLVM_ABI std::vector<std::string> getAllArgValues (OptSpecifier Id) const ;
292293
293294 // / @}
294295 // / @name Translation Utilities
@@ -298,19 +299,19 @@ class ArgList {
298299 // / true if the option is present, false if the negation is present, and
299300 // / \p Default if neither option is given. If both the option and its
300301 // / 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 ;
303304
304305 // / hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative
305306 // / form \p Neg, return true if the option or its alias is present, false if
306307 // / the negation is present, and \p Default if none of the options are
307308 // / 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,
309310 bool Default) const ;
310311
311312 // / Given an option Pos and its negative form Neg, render the option if Pos is
312313 // / present.
313- void addOptInFlag (ArgStringList &Output, OptSpecifier Pos,
314+ LLVM_ABI void addOptInFlag (ArgStringList &Output, OptSpecifier Pos,
314315 OptSpecifier Neg) const ;
315316 // / Render the option if Neg is present.
316317 void addOptOutFlag (ArgStringList &Output, OptSpecifier Pos,
@@ -331,17 +332,17 @@ class ArgList {
331332
332333 // / AddAllArgsExcept - Render all arguments matching any of the given ids
333334 // / 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,
335336 ArrayRef<OptSpecifier> ExcludeIds) const ;
336337 // / 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 ;
338339
339340 // / 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 ;
341342
342343 // / AddAllArgValues - Render the argument values of all arguments
343344 // / matching the given ids.
344- void AddAllArgValues (ArgStringList &Output, OptSpecifier Id0,
345+ LLVM_ABI void AddAllArgValues (ArgStringList &Output, OptSpecifier Id0,
345346 OptSpecifier Id1 = 0U , OptSpecifier Id2 = 0U ) const ;
346347
347348 // / AddAllArgsTranslated - Render all the arguments matching the
@@ -350,13 +351,13 @@ class ArgList {
350351 // /
351352 // / \param Joined - If true, render the argument as joined with
352353 // / the option specifier.
353- void AddAllArgsTranslated (ArgStringList &Output, OptSpecifier Id0,
354+ LLVM_ABI void AddAllArgsTranslated (ArgStringList &Output, OptSpecifier Id0,
354355 const char *Translation,
355356 bool Joined = false ) const ;
356357
357358 // / ClaimAllArgs - Claim all arguments which match the given
358359 // / option id.
359- void ClaimAllArgs (OptSpecifier Id0) const ;
360+ LLVM_ABI void ClaimAllArgs (OptSpecifier Id0) const ;
360361
361362 template <typename ... OptSpecifiers>
362363 void claimAllArgs (OptSpecifiers... Ids) const {
@@ -366,7 +367,7 @@ class ArgList {
366367
367368 // / ClaimAllArgs - Claim all arguments.
368369 // /
369- void ClaimAllArgs () const ;
370+ LLVM_ABI void ClaimAllArgs () const ;
370371 // / @}
371372 // / @name Arg Synthesis
372373 // / @{
@@ -381,16 +382,16 @@ class ArgList {
381382
382383 // / Create an arg string for (\p LHS + \p RHS), reusing the
383384 // / string at \p Index if possible.
384- const char *GetOrMakeJoinedArgString (unsigned Index, StringRef LHS,
385+ LLVM_ABI const char *GetOrMakeJoinedArgString (unsigned Index, StringRef LHS,
385386 StringRef RHS) const ;
386387
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 ;
389390
390391 // / @}
391392};
392393
393- class InputArgList final : public ArgList {
394+ class LLVM_ABI InputArgList final : public ArgList {
394395private:
395396 // / List of argument strings used by the contained Args.
396397 // /
@@ -463,7 +464,7 @@ class InputArgList final : public ArgList {
463464
464465// / DerivedArgList - An ordered collection of driver arguments,
465466// / whose storage may be in another argument list.
466- class DerivedArgList final : public ArgList {
467+ class LLVM_ABI DerivedArgList final : public ArgList {
467468 const InputArgList &BaseArgs;
468469
469470 // / The list of arguments we synthesized.
0 commit comments