[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
sabre at nondot.org
Sun Jan 14 18:00:44 PST 2007
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.308 -> 1.309
---
Log message:
allow i1 to operators like shift and add.
---
Diffs of the changes: (+4 -4)
llvmAsmParser.y | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.308 llvm/lib/AsmParser/llvmAsmParser.y:1.309
--- llvm/lib/AsmParser/llvmAsmParser.y:1.308 Fri Jan 12 23:00:20 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y Sun Jan 14 20:00:29 2007
@@ -1274,7 +1274,7 @@
const llvm::Type* ElemTy = $4->get();
if ((unsigned)$2 != $2)
GEN_ERROR("Unsigned result not equal to signed result");
- if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
+ if (!ElemTy->isFloatingPoint() && !ElemTy->isIntegral())
GEN_ERROR("Element type of a PackedType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2!");
@@ -1777,7 +1777,7 @@
| ShiftOps '(' ConstVal ',' ConstVal ')' {
if ($5->getType() != Type::Int8Ty)
GEN_ERROR("Shift count for shift constant must be i8 type!");
- if (!$3->getType()->isInteger())
+ if (!$3->getType()->isIntegral())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
$$ = ConstantExpr::get($1, $3, $5);
@@ -2573,7 +2573,7 @@
InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
- if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
+ if (!(*$2)->isIntegral() && !(*$2)->isFloatingPoint() &&
!isa<PackedType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands!");
@@ -2637,7 +2637,7 @@
| ShiftOps ResolvedVal ',' ResolvedVal {
if ($4->getType() != Type::Int8Ty)
GEN_ERROR("Shift amount must be i8 type!");
- if (!$2->getType()->isInteger())
+ if (!$2->getType()->isIntegral())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
$$ = new ShiftInst($1, $2, $4);
More information about the llvm-commits
mailing list