Summary: https://llvm.org/bugs/show_bug.cgi?id=27396 This fixes an issue in response files where "\r\n" was being interpreted as two EOL markers (i.e. we consumed the '\r' as terminating the previous token, and then parsed the '\n' as a significant EOL). This breaks response files where joined arguments get split across multiple lines (like "-x\r\nc"). I also fixed an accidental issue in the response-file.c test, where the response file is appended to, instead of being overwritten. Reviewers: rnk Subscribers: danalbert, llvm-commits Differential Revision: http://reviews.llvm.org/D19289 llvm-svn: 266840
13 lines
478 B
C
13 lines
478 B
C
// Check that clang is able to process response files with extra whitespace.
|
|
// We generate a dos-style file with \r\n for line endings, and then split
|
|
// some joined arguments (like "-x c") across lines to ensure that regular
|
|
// clang (not clang-cl) can process it correctly.
|
|
//
|
|
// RUN: echo -en "-x\r\nc\r\n-DTEST\r\n" > %t.0.txt
|
|
// RUN: %clang -E @%t.0.txt %s -v 2>&1 | FileCheck %s -check-prefix=SHORT
|
|
// SHORT: extern int it_works;
|
|
|
|
#ifdef TEST
|
|
extern int it_works;
|
|
#endif
|