Remove the ASTDeserializationListener's MacroVisible() callback, which

is no longer necessary, as well as the little bit of infrastructure in
the AST writer that used it.

llvm-svn: 165684
This commit is contained in:
Douglas Gregor 2012-10-11 00:51:27 +00:00
parent 0634737452
commit 2f8925e257
4 changed files with 0 additions and 25 deletions

View File

@ -51,9 +51,6 @@ public:
/// \brief A macro definition was read from the AST file.
virtual void MacroDefinitionRead(serialization::PreprocessedEntityID,
MacroDefinition *MD) { }
/// \brief A macro definition that had previously been deserialized
/// (and removed via IdentifierRead) has now been made visible.
virtual void MacroVisible(IdentifierInfo *II) { }
/// \brief A module definition was read from the AST file.
virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) { }
};

View File

@ -262,9 +262,6 @@ private:
/// table, indexed by the Selector ID (-1).
std::vector<uint32_t> SelectorOffsets;
/// \brief The set of identifiers that had macro definitions at some point.
std::vector<const IdentifierInfo *> DeserializedMacroNames;
typedef llvm::MapVector<MacroInfo *, MacroUpdate> MacroUpdatesMap;
/// \brief Updates to macro definitions that were loaded from an AST file.
@ -700,7 +697,6 @@ public:
void SelectorRead(serialization::SelectorID ID, Selector Sel);
void MacroDefinitionRead(serialization::PreprocessedEntityID ID,
MacroDefinition *MD);
void MacroVisible(IdentifierInfo *II);
void ModuleRead(serialization::SubmoduleID ID, Module *Mod);
// PPMutationListener implementation.

View File

@ -2616,8 +2616,6 @@ void ASTReader::makeNamesVisible(const HiddenNames &Names) {
Macro.second->setHidden(!Macro.second->isPublic());
if (Macro.second->isDefined()) {
PP.makeLoadedMacroInfoVisible(Macro.first, Macro.second);
if (DeserializationListener)
DeserializationListener->MacroVisible(Macro.first);
}
}
}

View File

@ -1694,16 +1694,6 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) {
llvm::array_pod_sort(MacrosToEmit.begin(), MacrosToEmit.end(),
&compareMacroDefinitions);
// Resolve any identifiers that defined macros at the time they were
// deserialized, adding them to the list of macros to emit (if appropriate).
for (unsigned I = 0, N = DeserializedMacroNames.size(); I != N; ++I) {
IdentifierInfo *Name
= const_cast<IdentifierInfo *>(DeserializedMacroNames[I]);
if (Name->hadMacroDefinition() && MacroDefinitionsSeen.insert(Name))
MacrosToEmit.push_back(std::make_pair(Name,
PP.getMacroInfoHistory(Name)));
}
/// \brief Offsets of each of the macros into the bitstream, indexed by
/// the local macro ID
///
@ -4557,8 +4547,6 @@ void ASTWriter::ReaderInitialized(ASTReader *Reader) {
void ASTWriter::IdentifierRead(IdentID ID, IdentifierInfo *II) {
IdentifierIDs[II] = ID;
if (II->hadMacroDefinition())
DeserializedMacroNames.push_back(II);
}
void ASTWriter::MacroRead(serialization::MacroID ID, MacroInfo *MI) {
@ -4586,10 +4574,6 @@ void ASTWriter::MacroDefinitionRead(serialization::PreprocessedEntityID ID,
MacroDefinitions[MD] = ID;
}
void ASTWriter::MacroVisible(IdentifierInfo *II) {
DeserializedMacroNames.push_back(II);
}
void ASTWriter::ModuleRead(serialization::SubmoduleID ID, Module *Mod) {
assert(SubmoduleIDs.find(Mod) == SubmoduleIDs.end());
SubmoduleIDs[Mod] = ID;