aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-12 01:23:27 +0000
committerChris Lattner <sabre@nondot.org>2008-10-12 01:23:27 +0000
commit8527b71b1944b155a2bd60ec364d700299bc3ff7 (patch)
tree70b7d2cde08aa80090d417b4a3bb921c38f9b967 /lib/Lex/Lexer.cpp
parent590f0cc643274267d4d41125b62557e1d87886c3 (diff)
add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index e930f3def2..63bf58a12c 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -113,6 +113,8 @@ Lexer::Lexer(SourceLocation fileloc, const LangOptions &features,
Is_PragmaLexer = false;
InitCharacterInfo();
+ // If a MemoryBuffer was specified, use its start as BufferStart. This affects
+ // the source location objects produced by this lexer.
BufferStart = FromFile ? FromFile->getBufferStart() : BufStart;
BufferPtr = BufStart;
BufferEnd = BufEnd;