[FileCheck] Implement --ignore-case option.

The FileCheck utility is enhanced to support a `--ignore-case`
option. This is useful in cases where the output of Unix tools
differs in case (e.g. case not specified by Posix).

Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson, MaskRay

Differential Revision: https://reviews.llvm.org/D68146

llvm-svn: 374538
diff --git a/llvm/lib/Support/FileCheckImpl.h b/llvm/lib/Support/FileCheckImpl.h
index 001b358..06ce830 100644
--- a/llvm/lib/Support/FileCheckImpl.h
+++ b/llvm/lib/Support/FileCheckImpl.h
@@ -428,6 +428,9 @@
   /// line to the one with this CHECK.
   Optional<size_t> LineNumber;
 
+  /// Ignore case while matching if set to true.
+  bool IgnoreCase = false;
+
 public:
   FileCheckPattern(Check::FileCheckType Ty, FileCheckPatternContext *Context,
                    Optional<size_t> Line = None)