[llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y
Reid Spencer
reid at x10sys.com
Fri Jan 12 21:00:35 PST 2007
Changes in directory llvm/lib/AsmParser:
Lexer.l updated: 1.94 -> 1.95
llvmAsmParser.y updated: 1.307 -> 1.308
---
Log message:
Bye bye bool. AsmWriter doesn't generate it any more so AsmParser shouldn't
read it any more. This is consistent with the new IR as well.
---
Diffs of the changes: (+8 -6)
Lexer.l | 1 -
llvmAsmParser.y | 13 ++++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
Index: llvm/lib/AsmParser/Lexer.l
diff -u llvm/lib/AsmParser/Lexer.l:1.94 llvm/lib/AsmParser/Lexer.l:1.95
--- llvm/lib/AsmParser/Lexer.l:1.94 Fri Jan 12 13:20:46 2007
+++ llvm/lib/AsmParser/Lexer.l Fri Jan 12 23:00:20 2007
@@ -237,7 +237,6 @@
x86_fastcallcc { return X86_FASTCALLCC_TOK; }
void { RET_TY(Type::VoidTy, VOID); }
-bool { RET_TY(Type::Int1Ty, BOOL); }
float { RET_TY(Type::FloatTy, FLOAT); }
double { RET_TY(Type::DoubleTy,DOUBLE);}
label { RET_TY(Type::LabelTy, LABEL); }
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.307 llvm/lib/AsmParser/llvmAsmParser.y:1.308
--- llvm/lib/AsmParser/llvmAsmParser.y:1.307 Fri Jan 12 13:20:46 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y Fri Jan 12 23:00:20 2007
@@ -970,7 +970,7 @@
// Built in types...
%type <TypeVal> Types ResultTypes
%type <PrimType> IntType FPType PrimType // Classifications
-%token <PrimType> VOID BOOL INTTYPE
+%token <PrimType> VOID INTTYPE
%token <PrimType> FLOAT DOUBLE LABEL
%token TYPE
@@ -1198,7 +1198,7 @@
// Derived types are added later...
//
-PrimType : BOOL | INTTYPE | FLOAT | DOUBLE | LABEL ;
+PrimType : INTTYPE | FLOAT | DOUBLE | LABEL ;
Types
: OPAQUE {
@@ -1686,11 +1686,13 @@
$$ = ConstantInt::get($1, $2);
CHECK_FOR_ERROR
}
- | BOOL TRUETOK { // Boolean constants
+ | INTTYPE TRUETOK { // Boolean constants
+ assert(cast<IntegerType>($1)->getBitWidth() == 1 && "Not Bool?");
$$ = ConstantInt::getTrue();
CHECK_FOR_ERROR
}
- | BOOL FALSETOK { // Boolean constants
+ | INTTYPE FALSETOK { // Boolean constants
+ assert(cast<IntegerType>($1)->getBitWidth() == 1 && "Not Bool?");
$$ = ConstantInt::getFalse();
CHECK_FOR_ERROR
}
@@ -2362,7 +2364,8 @@
CHECK_FOR_ERROR
$$ = new BranchInst(tmpBB);
} // Conditional Branch...
- | BR BOOL ValueRef ',' LABEL ValueRef ',' LABEL ValueRef {
+ | BR INTTYPE ValueRef ',' LABEL ValueRef ',' LABEL ValueRef {
+ assert(cast<IntegerType>($2)->getBitWidth() == 1 && "Not Bool?");
BasicBlock* tmpBBA = getBBVal($6);
CHECK_FOR_ERROR
BasicBlock* tmpBBB = getBBVal($9);
More information about the llvm-commits
mailing list