summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-31 03:49:47 +0000
committerChris Lattner <sabre@nondot.org>2004-03-31 03:49:47 +0000
commitc0ba90e35c0731c717a8ac076c6082d2708f290c (patch)
tree151c2b8112940133daf5e8458dcb3866e3e91011 /llvm/lib
parent709f03e2dd830b1d94fa2e3280b0b757eb4c4915 (diff)
downloadbcm5719-llvm-c0ba90e35c0731c717a8ac076c6082d2708f290c.tar.gz
bcm5719-llvm-c0ba90e35c0731c717a8ac076c6082d2708f290c.zip
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
llvm-svn: 12566
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/Lexer.l4
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y10
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/AsmParser/Lexer.l b/llvm/lib/AsmParser/Lexer.l
index 3203fe5b518..510fedb8698 100644
--- a/llvm/lib/AsmParser/Lexer.l
+++ b/llvm/lib/AsmParser/Lexer.l
@@ -174,8 +174,8 @@ HexIntConstant [us]0x[0-9A-Fa-f]+
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; }
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index 88e75e3da2b..ae56c1d23a6 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/lib/AsmParser/llvmAsmParser.y
@@ -857,7 +857,7 @@ using namespace llvm;
%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 @@ ConstVal : SIntType EINT64VAL { // integral constants
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 @@ ConstValueRef : ESINT64VAL { // A reference to a direct constant
| FPVAL { // Perhaps it's an FP constant?
$$ = ValID::create($1);
}
- | TRUE {
+ | TRUETOK {
$$ = ValID::create(ConstantBool::True);
}
- | FALSE {
+ | FALSETOK {
$$ = ValID::create(ConstantBool::False);
}
| NULL_TOK {
OpenPOWER on IntegriCloud