[llvm-commits] [llvm] r119023 - /llvm/trunk/utils/FileCheck/FileCheck.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Sat Nov 13 19:28:22 PST 2010
Author: chapuni
Date: Sat Nov 13 21:28:22 2010
New Revision: 119023
URL: http://llvm.org/viewvc/llvm-project?rev=119023&view=rev
Log:
FileCheck: Eliminate DOSish \r from input file.
It can pass two tests below on Win32.
- Clang :: CodeGenCXX/dyncast.cpp
- LLVM :: CodeGen/ARM/globals.ll
Modified:
llvm/trunk/utils/FileCheck/FileCheck.cpp
Modified: llvm/trunk/utils/FileCheck/FileCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/FileCheck.cpp?rev=119023&r1=119022&r2=119023&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/FileCheck.cpp (original)
+++ llvm/trunk/utils/FileCheck/FileCheck.cpp Sat Nov 13 21:28:22 2010
@@ -456,6 +456,11 @@
for (const char *Ptr = MB->getBufferStart(), *End = MB->getBufferEnd();
Ptr != End; ++Ptr) {
+ // Eliminate trailing dosish \r.
+ if (Ptr <= End - 2 && Ptr[0] == '\r' && Ptr[1] == '\n') {
+ continue;
+ }
+
// If C is not a horizontal whitespace, skip it.
if (*Ptr != ' ' && *Ptr != '\t') {
NewFile.push_back(*Ptr);
More information about the llvm-commits
mailing list