summaryrefslogtreecommitdiffstats
path: root/llvm/utils/FileCheck
Commit message (Collapse)AuthorAgeFilesLines
* Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz2013-10-121-0/+1
| | | | llvm-svn: 192519
* Really fix CHECK-LABEL and CHECK-DAG interaction. This actually just ↵Stephen Lin2013-10-111-9/+17
| | | | | | restores the initial implementation that was in r186162 but got lost in some subsequent refactoring. More explicit variable names and comments are present now to hopefully prevent repeat regression, as well as another test. llvm-svn: 192477
* Fix handling of CHECK-DAG inside of CHECK-LABEL.Rafael Espindola2013-10-111-6/+4
| | | | llvm-svn: 192463
* Revert "Revert "Windows: Add support for unicode command lines""David Majnemer2013-10-071-1/+1
| | | | | | | This reverts commit r192070 which reverted r192069, I forgot to regenerate the configure scripts. llvm-svn: 192079
* Revert "Windows: Add support for unicode command lines"David Majnemer2013-10-061-1/+1
| | | | | | | This is causing MinGW bots to fail. This reverts commit r192069. llvm-svn: 192070
* Windows: Add support for unicode command linesDavid Majnemer2013-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The MSVCRT deliberately sends main() code-page specific characters. This isn't too useful to LLVM as we end up converting the arguments to UTF-16 and subsequently attempt to use the result as, for example, a file name. Instead, we need to have the ability to access the Unicode command line and transform it to UTF-8. This has the distinct advantage over using the MSVC-specific wmain() function as our entry point because: - It doesn't work on cygwin. - It only work on MinGW with caveats and only then on certain versions. - We get to keep our entry point as main(). :) N.B. This patch includes fixes to other parts of lib/Support/Windows s.t. we would be able to take advantage of getting the Unicode paths. E.G. clang spawning clang -cc1 would want to give it Unicode arguments. Reviewers: aaron.ballman, Bigcheese, rnk, ruiu Reviewed By: rnk CC: llvm-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1834 llvm-svn: 192069
* Missed using check type enum in one placeMatt Arsenault2013-09-171-6/+6
| | | | llvm-svn: 190897
* Use function's argument instead of the global flag.Matt Arsenault2013-09-171-3/+3
| | | | | | For now it happens the argument is always the same. llvm-svn: 190896
* FileCheck refactor: use enum instead of bunch of boolsMatt Arsenault2013-09-171-76/+88
| | | | llvm-svn: 190893
* FileCheck: Fix stray quote in CHECK-LABEL error message.Stephen Lin2013-08-161-1/+1
| | | | llvm-svn: 188564
* [FileCheck] Fix a bug that cause FileCheck to misidentify check-prefixRui Ueyama2013-08-121-2/+26
| | | | | | | | | FileCheck should check to make sure the prefix was found, and not a word containing it (e.g -check-prefix=BASEREL shouldn't match NOBASEREL). Patch by Ron Ofir. llvm-svn: 188221
* Fix handling of CHECK-DAG combined with CHECK-NOTTim Northover2013-08-021-2/+1
| | | | | | Patch by Daniel Sanders. llvm-svn: 187651
* Add new directive called CHECK-LABEL to FileCheck.Stephen Lin2013-07-121-29/+94
| | | | | | | | CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks. Some tests will be converted to use this new directive in forthcoming patches. llvm-svn: 186162
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-251-2/+2
| | | | llvm-svn: 184826
* Add 'CHECK-DAG' supportMichael Liao2013-05-141-23/+147
| | | | | | Refer to 'FileCheck.rst'f for details of 'CHECK-DAG'. llvm-svn: 181827
* Refactor string checking. No functionality change.Michael Liao2013-05-141-62/+94
| | | | llvm-svn: 181824
* Remove SMLoc paired with CHECK-NOT patterns. Not functionality change.Michael Liao2013-04-251-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Pattern has source location by itself. After adding a trivial method to retrieve it, it's unnecessary to pair a source location for CHECK-NOT patterns. One thing revised after this is the diagnostic info is more accurate by pointing to the start of the CHECK-NOT pattern instead of the end of the CHECK-NOT pattern. E.g. diagnostic message previously looks like <stdin>:1:1: error: CHECK-NOT: string occurred! test ^ test.txt:1:16: note: CHECK-NOT: pattern specified here CHECK-NOT: test ^ is changed to <stdin>:1:1: error: CHECK-NOT: string occurred! test ^ test.txt:1:12: note: CHECK-NOT: pattern specified here CHECK-NOT: test ^ llvm-svn: 180578
* Remove tailing whitespacesMichael Liao2013-04-251-1/+1
| | | | llvm-svn: 180564
* Plug a memory leak in FileCheck when the input file is empty.Benjamin Kramer2013-03-231-6/+6
| | | | llvm-svn: 177822
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-121-1/+1
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. llvm-svn: 175006
* Canonicalize line endings to Linux style also when the --strict-whitespace ↵Guy Benyei2013-02-061-10/+14
| | | | | | flag is in use. This flag is supposed to affect horizontal whitespaces only. llvm-svn: 174541
* Sort the #include lines for utils/...Chandler Carruth2012-12-041-4/+4
| | | | | | | I've tried to find main moudle headers where possible, but the TableGen stuff may warrant someone else looking at it. llvm-svn: 169251
* Fix a bug in FileCheck that wouldn't let define variables as follows:Eli Bendersky2012-12-021-4/+47
| | | | | | | | | | | | ; CHECK: [[VAR:[a-z]]] The problem was that to find the end of the regex var definition, it was simplistically looking for the next ]] and finding the incorrect one. A better approach is to count nesting of brackets (taking escaping into account). This way the brackets that are part of the regex can be discovered and skipped properly, and the ]] ending is detected in the right place. llvm-svn: 169109
* Support referencing variables defined on the same line.Eli Bendersky2012-12-011-16/+40
| | | | | | | See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html and related discussions. llvm-svn: 169101
* Clean up whitespace and add commentsEli Bendersky2012-11-301-7/+8
| | | | llvm-svn: 169002
* Make FileCheck return 2 in case of an error as documented,Eli Bendersky2012-11-301-2/+2
| | | | | | instead of 1 or true (?!) llvm-svn: 169001
* FileCheck: remove useless 'continue' at the end of a 'while(){}' loop.Dmitri Gribenko2012-11-151-1/+0
| | | | llvm-svn: 168048
* Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions inAlexander Kornienko2012-11-141-27/+94
| | | | | | FileCheck. llvm-svn: 167978
* Clarify comment.Dmitri Gribenko2012-09-211-1/+1
| | | | llvm-svn: 164371
* FileCheck: Fix off-by-one bug that made CHECK-NOT: ignore the next character ↵Benjamin Kramer2012-09-181-2/+2
| | | | | | after the colon. llvm-svn: 164165
* Revert "Add -exact-match option to FileCheck to allow clients to do exact ↵Ted Kremenek2012-09-081-5/+1
| | | | | | | | | matches without using regular expressions." Turns out I did not need it after all. If we find a use for it in the future, we can resurrect it. llvm-svn: 163457
* Add -exact-match option to FileCheck to allow clients to do exact matches ↵Ted Kremenek2012-09-071-1/+5
| | | | | | without using regular expressions. llvm-svn: 163371
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-161-36/+37
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-161-1/+1
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* fix PR9629 - We were lowering regexes like a{{b|c}}d into ab|cd, whichChris Lattner2011-04-091-0/+8
| | | | | | | is substantially different than a(b|c)d. Form the latter regex instead. This found a few problems in the testsuite, which serves as its test. llvm-svn: 129196
* various cleanups, no functionality change.Chris Lattner2011-04-091-10/+6
| | | | llvm-svn: 129192
* Put targets on folders, if the IDE supports the feature.Oscar Fuentes2011-02-201-1/+1
| | | | | | Requires CMake 2.8.3 or newer. llvm-svn: 126092
* emit a specific error when the input file is empty. This fixes Chris Lattner2011-02-091-0/+5
| | | | | | | | | an annoyance of mine when working on tests: if the input .ll file is broken, opt outputs an error and generates an empty file. FileCheck then emits its "ooh I couldn't find the first CHECK line, scanning from ..." which obfuscates the actual problem. llvm-svn: 125193
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-6/+9
| | | | | | via an out parm. llvm-svn: 121958
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-091-8/+7
| | | | | | error_code &ec. And fix clients. llvm-svn: 121379
* Merge System into Support.Michael J. Spencer2010-11-293-5/+5
| | | | llvm-svn: 120298
* FileCheck: Eliminate DOSish \r from input file.NAKAMURA Takumi2010-11-141-0/+5
| | | | | | | | It can pass two tests below on Win32. - Clang :: CodeGenCXX/dyncast.cpp - LLVM :: CodeGen/ARM/globals.ll llvm-svn: 119023
* Teach FileCheck to handle trailing CHECK-NOT patterns.Jakob Stoklund Olesen2010-10-151-9/+22
| | | | | | | | | | A CHECK-NOT pattern without a following CHECK pattern simply checks that the pattern doesn't match before the end of the input file. You can even have only CHECK-NOT patterns to check that strings appear nowhere in the input file. llvm-svn: 116592
* Trailing whitespace.Mikhail Glushenkov2010-08-201-80/+80
| | | | llvm-svn: 111656
* stringref-ize the MemoryBuffer::get apis. This requiresChris Lattner2010-04-051-4/+2
| | | | | | a co-committed clang patch. llvm-svn: 100485
* FileCheck: Don't print "possibly intended match" line if it would match theDaniel Dunbar2010-03-191-5/+6
| | | | | | "scanning from here" one. llvm-svn: 98971
* FileCheck: When looking for "possible matches", only compare against the prefixDaniel Dunbar2010-01-301-1/+4
| | | | | | | line. Turns out edit_distance can be slow if the string we are scanning for happens to be quite large. llvm-svn: 94860
* Minor code cleanup.Dan Gohman2010-01-291-1/+1
| | | | llvm-svn: 94848
* Skip whitespace when looking for a potential intended match.Dan Gohman2010-01-291-0/+5
| | | | | | | | | | | | | | | Before: <stdin>:94:1: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ After: <stdin>:94:2: note: possible intended match here movsd 4096(%rsi), %xmm0 ^ llvm-svn: 94847
* Fix the position of the caret in the FileCheck error message.Dan Gohman2010-01-291-1/+4
| | | | | | | | | | | | | | | | Before: test/CodeGen/X86/lsr-reuse.ll:52:34: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ After: test/CodeGen/X86/lsr-reuse.ll:52:10: error: expected string not found in input ; CHECK: movsd -2048(%rsi), %xmm0 ^ llvm-svn: 94846
OpenPOWER on IntegriCloud