aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-08-24 18:36:07 +0000
committerErich Keane <erich.keane@intel.com>2017-08-24 18:36:07 +0000
commit5a2b322e0d27e6c0184fe8e835e4c1d33003f5c9 (patch)
tree243790b7f2f125a4119fb0d10023379b262ee654 /llvm/lib/Support/CommandLine.cpp
parent5c19028cec6567e196a7c5990ad644e2e6a483fb (diff)
downloadllvm-5a2b322e0d27e6c0184fe8e835e4c1d33003f5c9.zip
llvm-5a2b322e0d27e6c0184fe8e835e4c1d33003f5c9.tar.gz
llvm-5a2b322e0d27e6c0184fe8e835e4c1d33003f5c9.tar.bz2
[Preprocessor] Correct internal token parsing of newline characters in CRLF
Discovered due to a goofy git setup, the test system-headerline-directive.c (and a few others) failed because the token-consumption will consume only the '\r' in CRLF, making the preprocessor's printed value give the wrong line number when returning from an include. For example: (line 1):#include <noline.h>\r\n The "file exit" code causes the printer to try to print the 'returned to the main file' line. It looks up what the current line number is. However, since the current 'token' is the '\n' (since only the \r was consumed), it will give the line number as '1", not '2'. This results in a few failed tests, but more importantly, results in error messages being incorrect when compiling a previously preprocessed file. Differential Revision: https://reviews.llvm.org/D37079 llvm-svn: 311683
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions