diff options
Diffstat (limited to 'lib/Frontend/PCHReader.cpp')
-rw-r--r-- | lib/Frontend/PCHReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 7483f7854c..7ca0300eed 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -270,6 +270,8 @@ public: // Read all of the declarations visible at global scope with this // name. Sema *SemaObj = Reader.getSema(); + if (!SemaObj) return II; + while (DataLen > 0) { NamedDecl *D = cast<NamedDecl>(Reader.GetDecl(ReadUnalignedLE32(d))); if (SemaObj) { |