aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-upgrade')
-rw-r--r--tools/llvm-upgrade/UpgradeInternals.h9
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.cpp.cvs371
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l6
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l.cvs6
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y18
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y.cvs18
6 files changed, 223 insertions, 205 deletions
diff --git a/tools/llvm-upgrade/UpgradeInternals.h b/tools/llvm-upgrade/UpgradeInternals.h
index 0e00400..756a86a 100644
--- a/tools/llvm-upgrade/UpgradeInternals.h
+++ b/tools/llvm-upgrade/UpgradeInternals.h
@@ -159,7 +159,7 @@ struct ValID {
char *Name; // If it's a named reference. Memory must be free'd.
int64_t ConstPool64; // Constant pool reference. This is the value
uint64_t UConstPool64;// Unsigned constant pool reference.
- double ConstPoolFP; // Floating point constant pool reference
+ APFloat *ConstPoolFP; // Floating point constant pool reference
Constant *ConstantValue; // Fully resolved constant for ConstantVal case.
InlineAsmDescriptor *IAD;
};
@@ -187,7 +187,7 @@ struct ValID {
return D;
}
- static ValID create(double Val) {
+ static ValID create(APFloat* Val) {
ValID D; D.Type = ConstFPVal; D.ConstPoolFP = Val;
D.S.makeSignless();
return D;
@@ -245,7 +245,7 @@ struct ValID {
switch (Type) {
case NumberVal : return std::string("#") + itostr(Num);
case NameVal : return Name;
- case ConstFPVal : return ftostr(ConstPoolFP);
+ case ConstFPVal : return ftostr(*ConstPoolFP);
case ConstNullVal : return "null";
case ConstUndefVal : return "undef";
case ConstZeroVal : return "zeroinitializer";
@@ -271,7 +271,8 @@ struct ValID {
case NameVal: return strcmp(Name, V.Name) < 0;
case ConstSIntVal: return ConstPool64 < V.ConstPool64;
case ConstUIntVal: return UConstPool64 < V.UConstPool64;
- case ConstFPVal: return ConstPoolFP < V.ConstPoolFP;
+ case ConstFPVal: return ConstPoolFP->compare(*V.ConstPoolFP) ==
+ APFloat::cmpLessThan;
case ConstNullVal: return false;
case ConstUndefVal: return false;
case ConstZeroVal: return false;
diff --git a/tools/llvm-upgrade/UpgradeLexer.cpp.cvs b/tools/llvm-upgrade/UpgradeLexer.cpp.cvs
index 68ae9a4..7756bbc 100644
--- a/tools/llvm-upgrade/UpgradeLexer.cpp.cvs
+++ b/tools/llvm-upgrade/UpgradeLexer.cpp.cvs
@@ -17,10 +17,10 @@
#define yylineno Upgradelineno
#line 20 "UpgradeLexer.cpp"
-/* A lexical scanner generated by flex*/
+/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header$
+ * $Header: /cvs/root/flex/flex/skel.c,v 1.2 2004/05/07 00:28:17 jkh Exp $
*/
#define FLEX_SCANNER
@@ -28,7 +28,6 @@
#define YY_FLEX_MINOR_VERSION 5
#include <stdio.h>
-#include <unistd.h>
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
@@ -42,6 +41,7 @@
#ifdef __cplusplus
#include <stdlib.h>
+#include <unistd.h>
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
@@ -153,15 +153,6 @@ extern FILE *yyin, *yyout;
#define unput(c) yyunput( c, yytext_ptr )
-/* Some routines like yy_flex_realloc() are emitted as static but are
- not called by all lexers. This generates warnings in some compilers,
- notably GCC. Arrange to suppress these. */
-#ifdef __GNUC__
-#define YY_MAY_BE_UNUSED __attribute__((unused))
-#else
-#define YY_MAY_BE_UNUSED
-#endif
-
/* The following is because we cannot portably get our hands on size_t
* (without autoconf's help, which isn't available because we want
* flex-generated scanners to compile on their own).
@@ -268,7 +259,7 @@ YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
+static inline void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
@@ -934,7 +925,7 @@ goto find_rule; \
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
-#line 1 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 1 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
#define INITIAL 0
/*===-- UpgradeLexer.l - Scanner for 1.9 assembly files --------*- C++ -*--===//
//
@@ -949,7 +940,7 @@ char *yytext;
//
//===----------------------------------------------------------------------===*/
#define YY_NEVER_INTERACTIVE 1
-#line 28 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 28 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
#include "UpgradeInternals.h"
#include "llvm/Module.h"
#include <list>
@@ -1090,7 +1081,7 @@ using namespace llvm;
/* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
* it to deal with 64 bit numbers.
*/
-#line 1094 "UpgradeLexer.cpp"
+#line 1085 "UpgradeLexer.cpp"
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1238,13 +1229,13 @@ YY_MALLOC_DECL
YY_DECL
{
register yy_state_type yy_current_state;
- register char *yy_cp = NULL, *yy_bp = NULL;
+ register char *yy_cp, *yy_bp;
register int yy_act;
-#line 194 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 194 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
-#line 1248 "UpgradeLexer.cpp"
+#line 1239 "UpgradeLexer.cpp"
if ( yy_init )
{
@@ -1337,742 +1328,742 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 196 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 196 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore comments for now */ }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 198 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 198 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return BEGINTOK; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 199 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ENDTOK; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 200 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 200 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TRUETOK; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 201 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 201 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return FALSETOK; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 202 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 202 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DECLARE; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 203 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 203 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return GLOBAL; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 204 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 204 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return CONSTANT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 205 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 205 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return INTERNAL; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 206 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 206 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return LINKONCE; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 207 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 207 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return WEAK; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 208 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 208 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return APPENDING; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 209 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 209 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DLLIMPORT; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 210 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 210 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DLLEXPORT; }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 211 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 211 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return EXTERN_WEAK; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 212 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 212 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return EXTERNAL; } /* Deprecated, turn into external */
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 213 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 213 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return EXTERNAL; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 214 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 214 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return IMPLEMENTATION; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 215 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 215 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ZEROINITIALIZER; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 216 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 216 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DOTDOTDOT; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 217 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 217 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UNDEF; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 218 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return NULL_TOK; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 219 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 219 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TO; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 220 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 220 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return EXCEPT; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 221 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 221 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return NOT; } /* Deprecated, turned into XOR */
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 222 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 222 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TAIL; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 223 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 223 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TARGET; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 224 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 224 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TRIPLE; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 225 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 225 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DEPLIBS; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 226 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 226 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ENDIAN; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 227 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 227 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return POINTERSIZE; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 228 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 228 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return DATALAYOUT; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 229 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 229 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return LITTLE; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 230 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 230 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return BIG; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 231 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 231 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return VOLATILE; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 232 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 232 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ALIGN; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 233 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 233 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SECTION; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 234 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 234 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return MODULE; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 235 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 235 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ASM_TOK; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 236 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 236 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SIDEEFFECT; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 238 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 238 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return CC_TOK; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 239 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 239 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return CCC_TOK; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 240 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 240 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return CSRETCC_TOK; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 241 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 241 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return FASTCC_TOK; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 242 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 242 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return COLDCC_TOK; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 243 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 243 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return X86_STDCALLCC_TOK; }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 244 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 244 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return X86_FASTCALLCC_TOK; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 246 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SBYTE, Type::Int8Ty, 2); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 247 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 247 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UBYTE, Type::Int8Ty, 1); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 248 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 248 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UBYTE, Type::Int8Ty, 1); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 249 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 249 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(SHORT, Type::Int16Ty, 2); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 250 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 250 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(USHORT, Type::Int16Ty, 1); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 251 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 251 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(USHORT, Type::Int16Ty, 1); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 252 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 252 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(INT, Type::Int32Ty, 2); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 253 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 253 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UINT, Type::Int32Ty, 1); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 254 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 254 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(UINT, Type::Int32Ty, 1); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 255 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 255 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LONG, Type::Int64Ty, 2); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 256 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 256 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(ULONG, Type::Int64Ty, 1); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 257 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 257 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(ULONG, Type::Int64Ty, 1); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 258 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 258 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(VOID, Type::VoidTy, 0); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 259 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 259 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(BOOL, Type::Int1Ty, 1); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 260 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 260 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(BOOL, Type::Int1Ty, 1); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 261 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 261 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(FLOAT, Type::FloatTy, 0); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 262 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 262 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(DOUBLE, Type::DoubleTy,0); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 263 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 263 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TY(LABEL, Type::LabelTy, 0); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 264 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 264 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return TYPE; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 265 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 265 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OPAQUE; }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 267 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 267 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, AddOp, ADD); }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 268 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 268 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SubOp, SUB); }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 269 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 269 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, MulOp, MUL); }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 270 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 270 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, DivOp, DIV); }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 271 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 271 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, UDivOp, UDIV); }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 272 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 272 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SDivOp, SDIV); }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 273 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 273 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, FDivOp, FDIV); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 274 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 274 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, RemOp, REM); }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 275 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 275 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, URemOp, UREM); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 276 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 276 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SRemOp, SREM); }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 277 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 277 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, FRemOp, FREM); }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 278 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 278 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, AndOp, AND); }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 279 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, OrOp , OR ); }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 280 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 280 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, XorOp, XOR); }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 281 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 281 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetNE, SETNE); }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 282 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 282 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetEQ, SETEQ); }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 283 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 283 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetLT, SETLT); }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 284 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 284 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetGT, SETGT); }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 285 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetLE, SETLE); }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 286 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 286 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, SetGE, SETGE); }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 287 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 287 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, ShlOp, SHL); }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 288 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 288 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, ShrOp, SHR); }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 289 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 289 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, LShrOp, LSHR); }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 290 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 290 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(BinaryOpVal, AShrOp, ASHR); }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 292 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 292 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, ICmpOp, ICMP); }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 293 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 293 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, FCmpOp, FCMP); }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 295 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 295 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return EQ; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 296 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 296 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return NE; }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 297 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 297 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SLT; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 298 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 298 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SGT; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 299 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 299 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SLE; }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 300 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 300 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return SGE; }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 301 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 301 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ULT; }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 302 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 302 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UGT; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 303 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 303 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ULE; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 304 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 304 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UGE; }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 305 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 305 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OEQ; }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 306 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 306 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ONE; }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 307 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 307 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OLT; }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 308 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 308 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OGT; }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 309 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 309 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OLE; }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 310 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return OGE; }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 311 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 311 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return ORD; }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 312 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 312 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UNO; }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 313 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 313 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UEQ; }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 314 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UNE; }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 316 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 316 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, PHIOp, PHI_TOK); }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 317 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 317 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, CallOp, CALL); }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 318 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 318 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, CastOp, CAST); }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 319 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 319 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, TruncOp, TRUNC); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 320 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 320 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, ZExtOp , ZEXT); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 321 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, SExtOp, SEXT); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 322 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 322 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, FPTruncOp, FPTRUNC); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 323 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 323 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, FPExtOp, FPEXT); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 324 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 324 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, FPToUIOp, FPTOUI); }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 325 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 325 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, FPToSIOp, FPTOSI); }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 326 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 326 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, UIToFPOp, UITOFP); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 327 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 327 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, SIToFPOp, SITOFP); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 328 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 328 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, PtrToIntOp, PTRTOINT); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 329 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 329 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, IntToPtrOp, INTTOPTR); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 330 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 330 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(CastOpVal, BitCastOp, BITCAST); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 331 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 331 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, SelectOp, SELECT); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 332 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 332 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return VANEXT_old; }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 333 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 333 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return VAARG_old; }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 334 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 334 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, VAArg , VAARG); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 335 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 335 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TermOpVal, RetOp, RET); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 336 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 336 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TermOpVal, BrOp, BR); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 337 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 337 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TermOpVal, SwitchOp, SWITCH); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 338 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 338 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TermOpVal, InvokeOp, INVOKE); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 339 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 339 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return UNWIND; }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 340 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(TermOpVal, UnreachableOp, UNREACHABLE); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 342 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 342 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, MallocOp, MALLOC); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 343 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 343 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, AllocaOp, ALLOCA); }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 344 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 344 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, FreeOp, FREE); }
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 345 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 345 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, LoadOp, LOAD); }
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 346 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 346 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, StoreOp, STORE); }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 347 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 347 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(MemOpVal, GetElementPtrOp, GETELEMENTPTR); }
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 349 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 349 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, ExtractElementOp, EXTRACTELEMENT); }
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 350 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 350 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, InsertElementOp, INSERTELEMENT); }
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 351 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 351 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); }
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 354 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 354 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
UnEscapeLexed(yytext+1);
Upgradelval.StrVal = strdup(yytext+1); // Skip %
@@ -2081,7 +2072,7 @@ YY_RULE_SETUP
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 359 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 359 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
yytext[strlen(yytext)-1] = 0; // nuke colon
UnEscapeLexed(yytext);
@@ -2091,7 +2082,7 @@ YY_RULE_SETUP
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 365 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 365 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
UnEscapeLexed(yytext+1);
@@ -2101,7 +2092,7 @@ YY_RULE_SETUP
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 372 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 372 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ // Note that we cannot unescape a string constant here! The
// string constant might contain a \00 which would not be
// understood by the string stuff. It is valid to make a
@@ -2114,12 +2105,12 @@ YY_RULE_SETUP
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 383 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ Upgradelval.UInt64Val = atoull(yytext); return EUINT64VAL; }
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 384 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 384 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
uint64_t Val = atoull(yytext+1);
// +1: we have bigger negative range
@@ -2131,7 +2122,7 @@ YY_RULE_SETUP
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 392 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 392 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
Upgradelval.UInt64Val = HexIntToVal(yytext+3);
return yytext[0] == 's' ? ESINT64VAL : EUINT64VAL;
@@ -2139,7 +2130,7 @@ YY_RULE_SETUP
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 397 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
uint64_t Val = atoull(yytext+1);
if ((unsigned)Val != Val)
@@ -2150,7 +2141,7 @@ YY_RULE_SETUP
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 404 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 404 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
uint64_t Val = atoull(yytext+2);
// +1: we have bigger negative range
@@ -2162,16 +2153,18 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 413 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
-{ Upgradelval.FPVal = atof(yytext); return FPVAL; }
+#line 413 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
+{ Upgradelval.FPVal = new APFloat(atof(yytext)); return FPVAL; }
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 414 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
-{ Upgradelval.FPVal = HexToFP(yytext); return FPVAL; }
+#line 414 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
+{ Upgradelval.FPVal = new APFloat(HexToFP(yytext));
+ return FPVAL;
+ }
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 416 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 418 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{
/* Make sure to free the internal buffers for flex when we are
* done reading our input!
@@ -2182,20 +2175,20 @@ case YY_STATE_EOF(INITIAL):
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 424 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 426 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ /* Ignore whitespace */ }
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 425 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 427 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
{ return yytext[0]; }
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 427 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 429 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 2199 "UpgradeLexer.cpp"
+#line 2192 "UpgradeLexer.cpp"
case YY_END_OF_BUFFER:
{
@@ -2571,7 +2564,6 @@ register char *yy_bp;
#endif /* ifndef YY_NO_UNPUT */
-#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
@@ -2645,7 +2637,7 @@ static int input()
return c;
}
-#endif /* YY_NO_INPUT */
+
#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
@@ -2756,6 +2748,11 @@ YY_BUFFER_STATE b;
}
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
@@ -3073,5 +3070,5 @@ int main()
return 0;
}
#endif
-#line 427 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeLexer.l"
+#line 429 "/Volumes/MacOS9/gcc/llvm/tools/llvm-upgrade/UpgradeLexer.l"
diff --git a/tools/llvm-upgrade/UpgradeLexer.l b/tools/llvm-upgrade/UpgradeLexer.l
index 300cf5c..5318736 100644
--- a/tools/llvm-upgrade/UpgradeLexer.l
+++ b/tools/llvm-upgrade/UpgradeLexer.l
@@ -410,8 +410,10 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); }
return SINTVAL;
}
-{FPConstant} { Upgradelval.FPVal = atof(yytext); return FPVAL; }
-{HexFPConstant} { Upgradelval.FPVal = HexToFP(yytext); return FPVAL; }
+{FPConstant} { Upgradelval.FPVal = new APFloat(atof(yytext)); return FPVAL; }
+{HexFPConstant} { Upgradelval.FPVal = new APFloat(HexToFP(yytext));
+ return FPVAL;
+ }
<<EOF>> {
/* Make sure to free the internal buffers for flex when we are
diff --git a/tools/llvm-upgrade/UpgradeLexer.l.cvs b/tools/llvm-upgrade/UpgradeLexer.l.cvs
index 300cf5c..5318736 100644
--- a/tools/llvm-upgrade/UpgradeLexer.l.cvs
+++ b/tools/llvm-upgrade/UpgradeLexer.l.cvs
@@ -410,8 +410,10 @@ shufflevector { RET_TOK(OtherOpVal, ShuffleVectorOp, SHUFFLEVECTOR); }
return SINTVAL;
}
-{FPConstant} { Upgradelval.FPVal = atof(yytext); return FPVAL; }
-{HexFPConstant} { Upgradelval.FPVal = HexToFP(yytext); return FPVAL; }
+{FPConstant} { Upgradelval.FPVal = new APFloat(atof(yytext)); return FPVAL; }
+{HexFPConstant} { Upgradelval.FPVal = new APFloat(HexToFP(yytext));
+ return FPVAL;
+ }
<<EOF>> {
/* Make sure to free the internal buffers for flex when we are
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index 9cc1af2..bc6342c 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/tools/llvm-upgrade/UpgradeParser.y
@@ -533,9 +533,13 @@ static Value *getExistingValue(const Type *Ty, const ValID &D) {
return ConstantInt::get(Ty, D.UConstPool64);
case ValID::ConstFPVal: // Is it a floating point const pool reference?
- if (!ConstantFP::isValueValidForType(Ty, D.ConstPoolFP))
+ if (!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP))
error("FP constant invalid for type");
- return ConstantFP::get(Ty, D.ConstPoolFP);
+ // Lexer has no type info, so builds all FP constants as double.
+ // Fix this here.
+ if (Ty==Type::FloatTy)
+ D.ConstPoolFP->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ return ConstantFP::get(Ty, *D.ConstPoolFP);
case ValID::ConstNullVal: // Is it a null value?
if (!isa<PointerType>(Ty))
@@ -1773,7 +1777,7 @@ using namespace llvm;
uint64_t UInt64Val;
int SIntVal;
unsigned UIntVal;
- double FPVal;
+ llvm::APFloat *FPVal;
bool BoolVal;
char *StrVal; // This memory is strdup'd!
@@ -2514,9 +2518,13 @@ ConstVal
$$.S.makeUnsigned();
}
| FPType FPVAL { // Float & Double constants
- if (!ConstantFP::isValueValidForType($1.T, $2))
+ if (!ConstantFP::isValueValidForType($1.T, *$2))
error("Floating point constant invalid for type");
- $$.C = ConstantFP::get($1.T, $2);
+ // Lexer has no type info, so builds all FP constants as double.
+ // Fix this here.
+ if ($1.T==Type::FloatTy)
+ $2->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ $$.C = ConstantFP::get($1.T, *$2);
$$.S.makeSignless();
}
;
diff --git a/tools/llvm-upgrade/UpgradeParser.y.cvs b/tools/llvm-upgrade/UpgradeParser.y.cvs
index 9cc1af2..bc6342c 100644
--- a/tools/llvm-upgrade/UpgradeParser.y.cvs
+++ b/tools/llvm-upgrade/UpgradeParser.y.cvs
@@ -533,9 +533,13 @@ static Value *getExistingValue(const Type *Ty, const ValID &D) {
return ConstantInt::get(Ty, D.UConstPool64);
case ValID::ConstFPVal: // Is it a floating point const pool reference?
- if (!ConstantFP::isValueValidForType(Ty, D.ConstPoolFP))
+ if (!ConstantFP::isValueValidForType(Ty, *D.ConstPoolFP))
error("FP constant invalid for type");
- return ConstantFP::get(Ty, D.ConstPoolFP);
+ // Lexer has no type info, so builds all FP constants as double.
+ // Fix this here.
+ if (Ty==Type::FloatTy)
+ D.ConstPoolFP->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ return ConstantFP::get(Ty, *D.ConstPoolFP);
case ValID::ConstNullVal: // Is it a null value?
if (!isa<PointerType>(Ty))
@@ -1773,7 +1777,7 @@ using namespace llvm;
uint64_t UInt64Val;
int SIntVal;
unsigned UIntVal;
- double FPVal;
+ llvm::APFloat *FPVal;
bool BoolVal;
char *StrVal; // This memory is strdup'd!
@@ -2514,9 +2518,13 @@ ConstVal
$$.S.makeUnsigned();
}
| FPType FPVAL { // Float & Double constants
- if (!ConstantFP::isValueValidForType($1.T, $2))
+ if (!ConstantFP::isValueValidForType($1.T, *$2))
error("Floating point constant invalid for type");
- $$.C = ConstantFP::get($1.T, $2);
+ // Lexer has no type info, so builds all FP constants as double.
+ // Fix this here.
+ if ($1.T==Type::FloatTy)
+ $2->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven);
+ $$.C = ConstantFP::get($1.T, *$2);
$$.S.makeSignless();
}
;