14 #ifndef LLVM_CLANG_LEX_MACROARGS_H
15 #define LLVM_CLANG_LEX_MACROARGS_H
18 #include "llvm/ADT/ArrayRef.h"
34 unsigned NumUnexpArgTokens;
46 std::vector<std::vector<Token> > PreExpArgTokens;
50 std::vector<Token> StringifiedArgs;
56 MacroArgs(
unsigned NumToks,
bool varargsElided)
57 : NumUnexpArgTokens(NumToks), VarargsElided(varargsElided),
88 const std::vector<Token> &
bool isVarargsElidedUse() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const std::vector< Token > & getPreExpArgument(unsigned Arg, const MacroInfo *MI, Preprocessor &PP)
void destroy(Preprocessor &PP)
const Token * getUnexpArgument(unsigned Arg) const
const Token & getStringifiedArgument(unsigned ArgNo, Preprocessor &PP, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd)
static Token StringifyArgument(const Token *ArgToks, Preprocessor &PP, bool Charify, SourceLocation ExpansionLocStart, SourceLocation ExpansionLocEnd)
unsigned getNumArguments() const
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
bool ArgNeedsPreexpansion(const Token *ArgTok, Preprocessor &PP) const
static unsigned getArgLength(const Token *ArgPtr)
Encapsulates the data about a macro definition (e.g. its tokens).
static MacroArgs * create(const MacroInfo *MI, ArrayRef< Token > UnexpArgTokens, bool VarargsElided, Preprocessor &PP)
MacroArgs ctor function - This destroys the vector passed in.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.