llvm-project/llvm
Eli Bendersky 10f22d7054 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html

llvm-svn: 168802
2012-11-28 19:00:02 +00:00
..
autoconf Fix a pasto. 2012-11-19 19:31:02 +00:00
bindings [python] fix get_library() 2012-11-20 22:27:55 +00:00
cmake Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG 2012-11-26 02:02:08 +00:00
docs Some grammar fixes 2012-11-28 00:27:25 +00:00
examples Fix gcc's -Wunused-but-set-variable warnings. 2012-11-26 00:56:44 +00:00
include Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
lib Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
projects Add ENABLE_CXX11 and ENABLE_WERROR to Makefile.llvm.rules for sample project. They were previously added to Makefile.llvm.config.in but the consumption was missing 2012-11-27 08:12:24 +00:00
runtime libprofile/CommonProfiling.c: Fix according to C89. 2012-11-02 01:32:02 +00:00
test Fix initial frame state on powerpc64. 2012-11-28 18:21:03 +00:00
tools Add back support for reading and parsing 'deplibs'. 2012-11-28 08:41:48 +00:00
unittests Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
utils Remove all references to TargetInstrInfoImpl. 2012-11-28 02:35:17 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Kick off 3.3 cycle for LLVM trunk. 2012-11-17 22:01:08 +00:00
CODE_OWNERS.TXT Remove some Clang-specific ownership roles. 2012-11-27 00:48:36 +00:00
CREDITS.TXT Finally add myself to the credits. 2012-11-16 18:44:36 +00:00
LICENSE.TXT Few more small CellSPU removals. 2012-11-14 22:13:56 +00:00
LLVMBuild.txt
Makefile [c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test. 2012-11-06 19:54:46 +00:00
Makefile.common
Makefile.config.in Re-enable support for --program-prefix. 2012-10-01 18:40:32 +00:00
Makefile.rules Use MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905> 2012-10-12 21:48:14 +00:00
README.txt test commit 2012-07-11 17:34:12 +00:00
configure Fix a pasto. 2012-11-19 19:31:02 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.