aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/Preprocessor.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-07-14 08:20:46 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-07-14 08:20:46 +0000
commit9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b (patch)
tree20b4a81817646d1b4944d3ebff2bb1efba855a62 /include/clang/Lex/Preprocessor.h
parent433db06b614f26dc6829e86d6ff469e2cca7d4f9 (diff)
Move the rest of the preprocessor terminology from 'instantiate' and
variants to 'expand'. This changed a couple of public APIs, including one public type "MacroInstantiation" which is now "MacroExpansion". The rest of the codebase was updated to reflect this, especially the libclang code. Two of the C++ (and thus easily changed) libclang APIs were updated as well because they pertained directly to the old MacroInstantiation class. No functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r--include/clang/Lex/Preprocessor.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index a2d495a9a7..f6f3205099 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -121,7 +121,7 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> {
/// Selectors - This table contains all the selectors in the program. Unlike
/// IdentifierTable above, this table *isn't* populated by the preprocessor.
- /// It is declared/instantiated here because it's role/lifetime is
+ /// It is declared/expanded here because it's role/lifetime is
/// conceptually similar the IdentifierTable. In addition, the current control
/// flow (in clang::ParseAST()), make it convenient to put here.
/// FIXME: Make sure the lifetime of Identifiers/Selectors *isn't* tied to
@@ -220,9 +220,9 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> {
/// previous macro value.
llvm::DenseMap<IdentifierInfo*, std::vector<MacroInfo*> > PragmaPushMacroInfo;
- /// \brief Instantiation source location for the last macro that expanded
+ /// \brief Expansion source location for the last macro that expanded
/// to no tokens.
- SourceLocation LastEmptyMacroInstantiationLoc;
+ SourceLocation LastEmptyMacroExpansionLoc;
// Various statistics we track for performance analysis.
unsigned NumDirectives, NumIncluded, NumDefined, NumUndefined, NumPragma;
@@ -249,7 +249,7 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> {
llvm::SmallVector<Token, 16> MacroExpandedTokens;
std::vector<std::pair<TokenLexer *, size_t> > MacroExpandingLexersStack;
- /// \brief A record of the macro definitions and instantiations that
+ /// \brief A record of the macro definitions and expansions that
/// occurred during preprocessing.
///
/// This is an optional side structure that can be enabled with
@@ -380,10 +380,10 @@ public:
macro_iterator macro_begin(bool IncludeExternalMacros = true) const;
macro_iterator macro_end(bool IncludeExternalMacros = true) const;
- /// \brief Instantiation source location for the last macro that expanded
+ /// \brief Expansion source location for the last macro that expanded
/// to no tokens.
- SourceLocation getLastEmptyMacroInstantiationLoc() const {
- return LastEmptyMacroInstantiationLoc;
+ SourceLocation getLastEmptyMacroExpansionLoc() const {
+ return LastEmptyMacroExpansionLoc;
}
const std::string &getPredefines() const { return Predefines; }
@@ -451,7 +451,7 @@ public:
/// \brief Create a new preprocessing record, which will keep track of
/// all macro expansions, macro definitions, etc.
- void createPreprocessingRecord(bool IncludeNestedMacroInstantiations);
+ void createPreprocessingRecord(bool IncludeNestedMacroExpansions);
/// EnterMainSourceFile - Enter the specified FileID as the main source file,
/// which implicitly adds the builtin defines etc.
@@ -667,7 +667,7 @@ public:
/// getSpelling() - Return the 'spelling' of the token at the given
/// location; does not go up to the spelling location or down to the
- /// instantiation location.
+ /// expansion location.
///
/// \param buffer A buffer which will be used only if the token requires
/// "cleaning", e.g. if it contains trigraphs or escaped newlines
@@ -730,7 +730,7 @@ public:
/// CreateString - Plop the specified string into a scratch buffer and set the
/// specified token's location and length to it. If specified, the source
- /// location provides a location of the instantiation point of the token.
+ /// location provides a location of the expansion point of the token.
void CreateString(const char *Buf, unsigned Len,
Token &Tok, SourceLocation SourceLoc = SourceLocation());
@@ -754,13 +754,13 @@ public:
}
/// \brief Returns true if the given MacroID location points at the first
- /// token of the macro instantiation.
+ /// token of the macro expansion.
bool isAtStartOfMacroExpansion(SourceLocation loc) const {
return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, Features);
}
/// \brief Returns true if the given MacroID location points at the last
- /// token of the macro instantiation.
+ /// token of the macro expansion.
bool isAtEndOfMacroExpansion(SourceLocation loc) const {
return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, Features);
}
@@ -1019,7 +1019,7 @@ private:
/// invoked to read all of the formal arguments specified for the macro
/// invocation. This returns null on error.
MacroArgs *ReadFunctionLikeMacroArgs(Token &MacroName, MacroInfo *MI,
- SourceLocation &InstantiationEnd);
+ SourceLocation &ExpansionEnd);
/// ExpandBuiltinMacro - If an identifier token is read that is to be expanded
/// as a builtin macro, handle it and return the next token as 'Tok'.