summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index d38b5308de0..1524da9bd66 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -2462,19 +2462,19 @@ bool ASTReader::ReadASTBlock(ModuleFile &F) {
KnownNamespaces.push_back(getGlobalDeclID(F, Record[I]));
break;
- case UNDEFINED_INTERNALS:
- if (UndefinedInternals.size() % 2 != 0) {
- Error("Invalid existing UndefinedInternals");
+ case UNDEFINED_BUT_USED:
+ if (UndefinedButUsed.size() % 2 != 0) {
+ Error("Invalid existing UndefinedButUsed");
return true;
}
if (Record.size() % 2 != 0) {
- Error("invalid undefined internals record");
+ Error("invalid undefined-but-used record");
return true;
}
for (unsigned I = 0, N = Record.size(); I != N; /* in loop */) {
- UndefinedInternals.push_back(getGlobalDeclID(F, Record[I++]));
- UndefinedInternals.push_back(
+ UndefinedButUsed.push_back(getGlobalDeclID(F, Record[I++]));
+ UndefinedButUsed.push_back(
ReadSourceLocation(F, Record, I).getRawEncoding());
}
break;
@@ -5962,16 +5962,15 @@ void ASTReader::ReadKnownNamespaces(
}
}
-void ASTReader::ReadUndefinedInternals(
+void ASTReader::ReadUndefinedButUsed(
llvm::DenseMap<NamedDecl*, SourceLocation> &Undefined) {
- for (unsigned Idx = 0, N = UndefinedInternals.size(); Idx != N;) {
- NamedDecl *D = cast<NamedDecl>(GetDecl(UndefinedInternals[Idx++]));
+ for (unsigned Idx = 0, N = UndefinedButUsed.size(); Idx != N;) {
+ NamedDecl *D = cast<NamedDecl>(GetDecl(UndefinedButUsed[Idx++]));
SourceLocation Loc =
- SourceLocation::getFromRawEncoding(UndefinedInternals[Idx++]);
+ SourceLocation::getFromRawEncoding(UndefinedButUsed[Idx++]);
Undefined.insert(std::make_pair(D, Loc));
}
}
-
void ASTReader::ReadTentativeDefinitions(
SmallVectorImpl<VarDecl *> &TentativeDefs) {
OpenPOWER on IntegriCloud