aboutsummaryrefslogtreecommitdiff
path: root/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
commit91ef460285021b5bf43b3850f0f8958a09b8939c (patch)
tree8be960ee89ea7b68ba8977e7a202304ce3b20afe /lib
parent1438102576b94d6dac9bb18e8df291c4d632572d (diff)
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12566 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/AsmParser/Lexer.l4
-rw-r--r--lib/AsmParser/llvmAsmParser.y10
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l
index 3203fe5b51..510fedb869 100644
--- a/lib/AsmParser/Lexer.l
+++ b/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/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index 88e75e3da2..ae56c1d23a 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/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 {