aboutsummaryrefslogtreecommitdiff
path: root/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-10-05 16:15:19 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-10-05 16:15:19 +0000
commit1d9f1fe7173e3084325f43c78af812a36d8a2a7c (patch)
tree62cc4283ca4e25e7c0a3c51f88c37d4586e01ffe /lib/Serialization/ASTReaderDecl.cpp
parentc3632730cc83ed7b51f0ab5c38997ae5a9439b0c (diff)
Give every file that ASTReader loads a type: module, PCH, precompiled preamble or main file. Base Decls' PCHLevel on this to make it more sane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 8b912efe42..a68f562a3f 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -168,7 +168,7 @@ void ASTDeclReader::VisitDecl(Decl *D) {
D->setImplicit(Record[Idx++]);
D->setUsed(Record[Idx++]);
D->setAccess((AccessSpecifier)Record[Idx++]);
- D->setPCHLevel(Record[Idx++] + 1);
+ D->setPCHLevel(Record[Idx++] + (F.Type <= ASTReader::PCH));
}
void ASTDeclReader::VisitTranslationUnitDecl(TranslationUnitDecl *TU) {