Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null |
Tanya Lattner | e9af5d1 | 2004-11-06 22:41:00 +0000 | [diff] [blame] | 2 | |
Chris Lattner | b3cd2c1 | 2002-02-13 20:35:17 +0000 | [diff] [blame] | 3 | /* This triggered a problem in reload, fixed by disabling most of the |
| 4 | * steps of compilation in GCC. Before this change, the code went through |
Misha Brukman | 5560c9d | 2003-08-18 14:43:39 +0000 | [diff] [blame] | 5 | * the entire backend of GCC, even though it was unnecessary for LLVM output |
Chris Lattner | b3cd2c1 | 2002-02-13 20:35:17 +0000 | [diff] [blame] | 6 | * now it is skipped entirely, and since reload doesn't run, it can't cause |
| 7 | * a problem. |
| 8 | */ |
| 9 | |
| 10 | extern int tolower(int); |
| 11 | |
| 12 | const char *rangematch(const char *pattern, int test, int c) { |
| 13 | |
| 14 | if ((c <= test) | (tolower(c) <= tolower((unsigned char)test))) |
| 15 | return 0; |
| 16 | |
| 17 | return pattern; |
| 18 | } |