[llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 30 21:49:02 PST 2004
Changes in directory llvm/lib/AsmParser:
Lexer.l updated: 1.47 -> 1.48
llvmAsmParser.y updated: 1.160 -> 1.161
---
Log message:
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
---
Diffs of the changes: (+7 -7)
Index: llvm/lib/AsmParser/Lexer.l
diff -u llvm/lib/AsmParser/Lexer.l:1.47 llvm/lib/AsmParser/Lexer.l:1.48
--- llvm/lib/AsmParser/Lexer.l:1.47 Fri Mar 19 17:34:33 2004
+++ llvm/lib/AsmParser/Lexer.l Tue Mar 30 21:48:33 2004
@@ -174,8 +174,8 @@
begin { return BEGINTOK; }
end { return ENDTOK; }
-true { return TRUE; }
-false { return FALSE; }
+true { return TRUETOK; }
+false { return FALSETOK; }
declare { return DECLARE; }
global { return GLOBAL; }
constant { return CONSTANT; }
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.160 llvm/lib/AsmParser/llvmAsmParser.y:1.161
--- llvm/lib/AsmParser/llvmAsmParser.y:1.160 Tue Mar 30 14:58:25 2004
+++ llvm/lib/AsmParser/llvmAsmParser.y Tue Mar 30 21:48:33 2004
@@ -857,7 +857,7 @@
%type <StrVal> Name OptName OptAssign
-%token IMPLEMENTATION ZEROINITIALIZER TRUE FALSE BEGINTOK ENDTOK
+%token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK
%token DECLARE GLOBAL CONSTANT VOLATILE
%token TO DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE WEAK APPENDING
%token OPAQUE NOT EXTERNAL TARGET ENDIAN POINTERSIZE LITTLE BIG
@@ -1210,10 +1210,10 @@
ThrowException("Constant value doesn't fit in type!");
$$ = ConstantUInt::get($1, $2);
}
- | BOOL TRUE { // Boolean constants
+ | BOOL TRUETOK { // Boolean constants
$$ = ConstantBool::True;
}
- | BOOL FALSE { // Boolean constants
+ | BOOL FALSETOK { // Boolean constants
$$ = ConstantBool::False;
}
| FPType FPVAL { // Float & Double constants
@@ -1550,10 +1550,10 @@
| FPVAL { // Perhaps it's an FP constant?
$$ = ValID::create($1);
}
- | TRUE {
+ | TRUETOK {
$$ = ValID::create(ConstantBool::True);
}
- | FALSE {
+ | FALSETOK {
$$ = ValID::create(ConstantBool::False);
}
| NULL_TOK {
More information about the llvm-commits
mailing list