aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PreprocessingRecord.cpp
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 /lib/Lex/PreprocessingRecord.cpp
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 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--lib/Lex/PreprocessingRecord.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp
index 0c8d948ce0..9f93ab0450 100644
--- a/lib/Lex/PreprocessingRecord.cpp
+++ b/lib/Lex/PreprocessingRecord.cpp
@@ -45,8 +45,8 @@ void PreprocessingRecord::MaybeLoadPreallocatedEntities() const {
ExternalSource->ReadPreprocessedEntities();
}
-PreprocessingRecord::PreprocessingRecord(bool IncludeNestedMacroInstantiations)
- : IncludeNestedMacroInstantiations(IncludeNestedMacroInstantiations),
+PreprocessingRecord::PreprocessingRecord(bool IncludeNestedMacroExpansions)
+ : IncludeNestedMacroExpansions(IncludeNestedMacroExpansions),
ExternalSource(0), NumPreallocatedEntities(0),
LoadedPreallocatedEntities(false)
{
@@ -121,14 +121,13 @@ MacroDefinition *PreprocessingRecord::findMacroDefinition(const MacroInfo *MI) {
}
void PreprocessingRecord::MacroExpands(const Token &Id, const MacroInfo* MI) {
- if (!IncludeNestedMacroInstantiations && Id.getLocation().isMacroID())
+ if (!IncludeNestedMacroExpansions && Id.getLocation().isMacroID())
return;
if (MacroDefinition *Def = findMacroDefinition(MI))
PreprocessedEntities.push_back(
- new (*this) MacroInstantiation(Id.getIdentifierInfo(),
- Id.getLocation(),
- Def));
+ new (*this) MacroExpansion(Id.getIdentifierInfo(),
+ Id.getLocation(), Def));
}
void PreprocessingRecord::MacroDefined(const Token &Id,