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); }
// 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
// Derived types are added later...
//
-PrimType : BOOL | INTTYPE | FLOAT | DOUBLE | LABEL ;
+PrimType : INTTYPE | FLOAT | DOUBLE | LABEL ;
Types
: OPAQUE {
$$ = 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
}
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);