llvm.org GIT mirror llvm / 9585dcb
[FileCheck] Remove a parameter that was simply always set to a commandline flag and test the flag directly. NFC. If we ever need this generality it can be added back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289381 91177308-0d34-0410-b5e6-96231b3b80d8 Chandler Carruth 2 years ago
1 changed file(s) with 4 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
636636
637637 /// Canonicalize whitespaces in the file. Line endings are replaced with
638638 /// UNIX-style '\n'.
639 ///
640 /// \param PreserveHorizontal Don't squash consecutive horizontal whitespace
641 /// characters to a single space.
642 static StringRef CanonicalizeFile(MemoryBuffer &MB, bool PreserveHorizontal,
639 static StringRef CanonicalizeFile(MemoryBuffer &MB,
643640 SmallVectorImpl &OutputBuffer) {
644641 OutputBuffer.reserve(MB.getBufferSize());
645642
652649
653650 // If current char is not a horizontal whitespace or if horizontal
654651 // whitespace canonicalization is disabled, dump it to output as is.
655 if (PreserveHorizontal || (*Ptr != ' ' && *Ptr != '\t')) {
652 if (NoCanonicalizeWhiteSpace || (*Ptr != ' ' && *Ptr != '\t')) {
656653 OutputBuffer.push_back(*Ptr);
657654 continue;
658655 }
13591356 MemoryBuffer &CheckFile = *CheckFileOrErr.get();
13601357
13611358 SmallString<4096> CheckFileBuffer;
1362 StringRef CheckFileText =
1363 CanonicalizeFile(CheckFile, NoCanonicalizeWhiteSpace, CheckFileBuffer);
1359 StringRef CheckFileText = CanonicalizeFile(CheckFile, CheckFileBuffer);
13641360
13651361 SM.AddNewSourceBuffer(MemoryBuffer::getMemBuffer(
13661362 CheckFileText, CheckFile.getBufferIdentifier()),
13871383 }
13881384
13891385 SmallString<4096> InputFileBuffer;
1390 StringRef InputFileText =
1391 CanonicalizeFile(InputFile, NoCanonicalizeWhiteSpace, InputFileBuffer);
1386 StringRef InputFileText = CanonicalizeFile(InputFile, InputFileBuffer);
13921387
13931388 SM.AddNewSourceBuffer(MemoryBuffer::getMemBuffer(
13941389 InputFileText, InputFile.getBufferIdentifier()),