summaryrefslogtreecommitdiff
path: root/tools/llvm-upgrade/UpgradeLexer.l.cvs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-03-21 17:15:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-03-21 17:15:50 +0000
commitbb1fd5770debf03c085777eef7ad121fb4b3eecf (patch)
tree72716de7069d8817beef235b0b64ff08d199b645 /tools/llvm-upgrade/UpgradeLexer.l.cvs
parent3e5affd26347351a67145e562b1599d124bcce4f (diff)
downloadllvm-bb1fd5770debf03c085777eef7ad121fb4b3eecf.tar.gz
llvm-bb1fd5770debf03c085777eef7ad121fb4b3eecf.tar.bz2
llvm-bb1fd5770debf03c085777eef7ad121fb4b3eecf.tar.xz
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-upgrade/UpgradeLexer.l.cvs')
-rw-r--r--tools/llvm-upgrade/UpgradeLexer.l.cvs43
1 files changed, 24 insertions, 19 deletions
diff --git a/tools/llvm-upgrade/UpgradeLexer.l.cvs b/tools/llvm-upgrade/UpgradeLexer.l.cvs
index ebab6db9c0..300cf5cc1a 100644
--- a/tools/llvm-upgrade/UpgradeLexer.l.cvs
+++ b/tools/llvm-upgrade/UpgradeLexer.l.cvs
@@ -51,7 +51,12 @@
#define RET_TY(sym,NewTY,sign) \
Upgradelval.PrimType.T = NewTY; \
- Upgradelval.PrimType.S = sign; \
+ switch (sign) { \
+ case 0: Upgradelval.PrimType.S.makeSignless(); break; \
+ case 1: Upgradelval.PrimType.S.makeUnsigned(); break; \
+ case 2: Upgradelval.PrimType.S.makeSigned(); break; \
+ default: assert(0 && "Invalid sign kind"); break; \
+ }\
return sym
namespace llvm {
@@ -238,24 +243,24 @@ coldcc { return COLDCC_TOK; }
x86_stdcallcc { return X86_STDCALLCC_TOK; }
x86_fastcallcc { return X86_FASTCALLCC_TOK; }
-sbyte { RET_TY(SBYTE, Type::Int8Ty, Signed); }
-ubyte { RET_TY(UBYTE, Type::Int8Ty, Unsigned); }
-i8 { RET_TY(UBYTE, Type::Int8Ty, Unsigned); }
-short { RET_TY(SHORT, Type::Int16Ty, Signed); }
-ushort { RET_TY(USHORT, Type::Int16Ty, Unsigned); }
-i16 { RET_TY(USHORT, Type::Int16Ty, Unsigned); }
-int { RET_TY(INT, Type::Int32Ty, Signed); }
-uint { RET_TY(UINT, Type::Int32Ty, Unsigned); }
-i32 { RET_TY(UINT, Type::Int32Ty, Unsigned); }
-long { RET_TY(LONG, Type::Int64Ty, Signed); }
-ulong { RET_TY(ULONG, Type::Int64Ty, Unsigned); }
-i64 { RET_TY(ULONG, Type::Int64Ty, Unsigned); }
-void { RET_TY(VOID, Type::VoidTy, Signless ); }
-bool { RET_TY(BOOL, Type::Int1Ty, Unsigned ); }
-i1 { RET_TY(BOOL, Type::Int1Ty, Unsigned ); }
-float { RET_TY(FLOAT, Type::FloatTy, Signless ); }
-double { RET_TY(DOUBLE, Type::DoubleTy,Signless); }
-label { RET_TY(LABEL, Type::LabelTy, Signless ); }
+sbyte { RET_TY(SBYTE, Type::Int8Ty, 2); }
+ubyte { RET_TY(UBYTE, Type::Int8Ty, 1); }
+i8 { RET_TY(UBYTE, Type::Int8Ty, 1); }
+short { RET_TY(SHORT, Type::Int16Ty, 2); }
+ushort { RET_TY(USHORT, Type::Int16Ty, 1); }
+i16 { RET_TY(USHORT, Type::Int16Ty, 1); }
+int { RET_TY(INT, Type::Int32Ty, 2); }
+uint { RET_TY(UINT, Type::Int32Ty, 1); }
+i32 { RET_TY(UINT, Type::Int32Ty, 1); }
+long { RET_TY(LONG, Type::Int64Ty, 2); }
+ulong { RET_TY(ULONG, Type::Int64Ty, 1); }
+i64 { RET_TY(ULONG, Type::Int64Ty, 1); }
+void { RET_TY(VOID, Type::VoidTy, 0); }
+bool { RET_TY(BOOL, Type::Int1Ty, 1); }
+i1 { RET_TY(BOOL, Type::Int1Ty, 1); }
+float { RET_TY(FLOAT, Type::FloatTy, 0); }
+double { RET_TY(DOUBLE, Type::DoubleTy,0); }
+label { RET_TY(LABEL, Type::LabelTy, 0); }
type { return TYPE; }
opaque { return OPAQUE; }