Go to file
Eric Fiselier df87d070c9 [lit] Support custom parsers in parseIntegratedTestScript
Summary:
Libc++ frequently has the need to parse more than just the builtin *test keywords* (`RUN`, `REQUIRES`, `XFAIL`, ect). For example libc++ currently needs a new keyword `MODULES-DEFINES: macro list...`. Instead of re-implementing the script parsing in libc++ this patch allows `parseIntegratedTestScript` to take custom parsers.

This patch introduces a new class `IntegratedTestKeywordParser` which implements the logic to parse/process a test keyword. Parsing of various keyword "kinds" are supported out of the box, including 'TAG', 'COMMAND', and 'LIST', which parse keywords such as `END.`, `RUN:` and `XFAIL:` respectively.

As an example after this change libc++ can implement the `MODULES-DEFINES` simply using: 
```
mparser = IntegratedTestKeywordParser('MODULES-DEFINES:', ParserKind.LIST)
parseIntegratedTestScript(test, additional_parsers=[mparser])
macro_list = mparser.getValue()
```


Reviewers: ddunbar, modocache, rnk, danalbert, jroelofs

Subscribers: mgrang, llvm-commits, cfe-commits

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

llvm-svn: 288694
2016-12-05 20:21:21 +00:00
clang Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec 2016-12-05 19:25:00 +00:00
clang-tools-extra [change-namespace] get changing namespace to global correct. 2016-12-05 11:17:04 +00:00
compiler-rt [compiler-rt] Remove duplicates from COMPILER_RT_SUPPORTED_ARCH 2016-12-05 17:52:45 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Fix build since r286752. 2016-11-14 16:06:33 +00:00
libcxx [libc++] Add _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS 2016-12-05 19:40:12 +00:00
libcxxabi [libc++abi] Add _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS 2016-12-05 19:42:11 +00:00
libunwind EHABI: mark some functions as exported 2016-11-17 23:53:35 +00:00
lld Include object file name to an error message. 2016-12-05 18:40:14 +00:00
lldb [CMake] Don't add gtest if it is already there 2016-12-05 19:40:34 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [lit] Support custom parsers in parseIntegratedTestScript 2016-12-05 20:21:21 +00:00
openmp fixed type in Windows-specific code 2016-12-01 16:08:52 +00:00
parallel-libs [Acxxel] Remove setActiveDeviceForThread 2016-10-28 00:54:02 +00:00
polly Allow to disable unsigned operations (zext, icmp ugt, ...) 2016-12-02 17:55:41 +00:00