[llvm-commits] [llvm] r121942 - /llvm/trunk/lib/Support/regexec.c

NAKAMURA Takumi geek4civic at gmail.com
Wed Dec 15 17:48:16 PST 2010


Author: chapuni
Date: Wed Dec 15 19:48:15 2010
New Revision: 121942

URL: http://llvm.org/viewvc/llvm-project?rev=121942&view=rev
Log:
lib/Support/regexec.c: Let Regex LLP64-aware.

On LLP64 Win64, 'states1' (for small version) was expanded to 'char *' for large version. Thus small version would be mischosen when nstates > 32 regardless of sizeof(long) on Win64.

Modified:
    llvm/trunk/lib/Support/regexec.c

Modified: llvm/trunk/lib/Support/regexec.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/regexec.c?rev=121942&r1=121941&r2=121942&view=diff
==============================================================================
--- llvm/trunk/lib/Support/regexec.c (original)
+++ llvm/trunk/lib/Support/regexec.c Wed Dec 15 19:48:15 2010
@@ -54,8 +54,9 @@
 #include "regex2.h"
 
 /* macros for manipulating states, small version */
-#define	states	long
-#define	states1	states		/* for later use in llvm_regexec() decision */
+/* FIXME: 'states' is assumed as 'long' on small version. */
+#define	states1	long		/* for later use in llvm_regexec() decision */
+#define	states	states1
 #define	CLEAR(v)	((v) = 0)
 #define	SET0(v, n)	((v) &= ~((unsigned long)1 << (n)))
 #define	SET1(v, n)	((v) |= (unsigned long)1 << (n))





More information about the llvm-commits mailing list