summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-13 05:00:20 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-13 05:00:20 +0000
commit502d64e6540c384ab8e1505b994333aef8a16848 (patch)
tree169a40ad5fba4d14f0d6784eeccd3b3cb12e1ecb /llvm/lib
parentd18708fce0712da29abd2b81305e1ad1eae850f8 (diff)
downloadbcm5719-llvm-502d64e6540c384ab8e1505b994333aef8a16848.tar.gz
bcm5719-llvm-502d64e6540c384ab8e1505b994333aef8a16848.zip
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. llvm-svn: 33181
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/Lexer.l1
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y13
2 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/AsmParser/Lexer.l b/llvm/lib/AsmParser/Lexer.l
index 22fe64bf0de..970a2143129 100644
--- a/llvm/lib/AsmParser/Lexer.l
+++ b/llvm/lib/AsmParser/Lexer.l
@@ -237,7 +237,6 @@ x86_stdcallcc { return X86_STDCALLCC_TOK; }
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); }
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index 52d8847d329..06d4666bb94 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/lib/AsmParser/llvmAsmParser.y
@@ -970,7 +970,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) {
// 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 @@ GlobalVarAttribute : SectionString {
// Derived types are added later...
//
-PrimType : BOOL | INTTYPE | FLOAT | DOUBLE | LABEL ;
+PrimType : INTTYPE | FLOAT | DOUBLE | LABEL ;
Types
: OPAQUE {
@@ -1686,11 +1686,13 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
$$ = 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 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
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);
OpenPOWER on IntegriCloud