From ad3ea3d85f164dc1b2746950e378334197d8688d Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 16 Dec 2010 01:48:15 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121942 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/regexec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Support/regexec.c b/lib/Support/regexec.c index 41fb2ea46c9..007861675ba 100644 --- a/lib/Support/regexec.c +++ b/lib/Support/regexec.c @@ -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))