diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
| commit | c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (patch) | |
| tree | 508d4388db78f87d35bf26a0400b4b03bc4c1f13 /lib/Lex/PPLexerChange.cpp | |
| parent | 4a37f65f1c1373c9956d118a012943de2f61edb0 (diff) | |
Notes
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
| -rw-r--r-- | lib/Lex/PPLexerChange.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index 81e6bf8090251..6d1c132fc0a95 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -80,8 +80,10 @@ bool Preprocessor::EnterSourceFile(FileID FID, const DirectoryLookup *CurDir, } // Get the MemoryBuffer for this FID, if it fails, we fail. - const llvm::MemoryBuffer *InputFile = getSourceManager().getBuffer(FID); - if (!InputFile) + bool Invalid = false; + const llvm::MemoryBuffer *InputFile = getSourceManager().getBuffer(FID, + &Invalid); + if (Invalid) return true; EnterSourceFileWithLexer(new Lexer(FID, InputFile, *this), CurDir); |
