diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-27 22:02:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-27 22:02:30 +0000 |
commit | 8804f40321c27394d328b9abe58c2ec8ef2621e1 (patch) | |
tree | 87912a84313482b0f3f82634045987a03bb038ae /clang/lib/Frontend/PCHReader.cpp | |
parent | 8575daaa825bb2e035463e3b2a88d4d1ed9cb588 (diff) | |
download | bcm5719-llvm-8804f40321c27394d328b9abe58c2ec8ef2621e1.tar.gz bcm5719-llvm-8804f40321c27394d328b9abe58c2ec8ef2621e1.zip |
-E, -Eonly and -parse-noop now work with PCH!
llvm-svn: 70259
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index 7483f7854c6..7ca0300eed1 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/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) { |