Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/RewriteMacros.cpp b/lib/Frontend/RewriteMacros.cpp
index 954e8e2..4ffb297 100644
--- a/lib/Frontend/RewriteMacros.cpp
+++ b/lib/Frontend/RewriteMacros.cpp
@@ -101,7 +101,8 @@
// Get the first preprocessing token.
- PP.EnterMainSourceFile();
+ if (PP.EnterMainSourceFile())
+ return;
Token PPTok;
PP.Lex(PPTok);