[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y llvmAsmParser.y.cvs
Chris Lattner
sabre at nondot.org
Sun Jan 14 18:28:14 PST 2007
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.cpp.cvs updated: 1.54 -> 1.55
llvmAsmParser.y updated: 1.309 -> 1.310
llvmAsmParser.y.cvs updated: 1.55 -> 1.56
---
Log message:
rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
---
Diffs of the changes: (+24 -24)
llvmAsmParser.cpp.cvs | 16 ++++++++--------
llvmAsmParser.y | 16 ++++++++--------
llvmAsmParser.y.cvs | 16 ++++++++--------
3 files changed, 24 insertions(+), 24 deletions(-)
Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.54 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.55
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.54 Sun Jan 14 20:12:06 2007
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Sun Jan 14 20:27:26 2007
@@ -2791,7 +2791,7 @@
const llvm::Type* ElemTy = yyvsp[-1].TypeVal->get();
if ((unsigned)yyvsp[-3].UInt64Val != yyvsp[-3].UInt64Val)
GEN_ERROR("Unsigned result not equal to signed result");
- if (!ElemTy->isFloatingPoint() && !ElemTy->isIntegral())
+ if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
GEN_ERROR("Element type of a PackedType must be primitive");
if (!isPowerOf2_32(yyvsp[-3].UInt64Val))
GEN_ERROR("Vector length should be a power of 2!");
@@ -3359,9 +3359,9 @@
{
if (yyvsp[-3].ConstVal->getType() != yyvsp[-1].ConstVal->getType())
GEN_ERROR("Logical operator types must match!");
- if (!yyvsp[-3].ConstVal->getType()->isIntegral()) {
+ if (!yyvsp[-3].ConstVal->getType()->isInteger()) {
if (!isa<PackedType>(yyvsp[-3].ConstVal->getType()) ||
- !cast<PackedType>(yyvsp[-3].ConstVal->getType())->getElementType()->isIntegral())
+ !cast<PackedType>(yyvsp[-3].ConstVal->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
yyval.ConstVal = ConstantExpr::get(yyvsp[-5].BinaryOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
@@ -3389,7 +3389,7 @@
{
if (yyvsp[-1].ConstVal->getType() != Type::Int8Ty)
GEN_ERROR("Shift count for shift constant must be i8 type!");
- if (!yyvsp[-3].ConstVal->getType()->isIntegral())
+ if (!yyvsp[-3].ConstVal->getType()->isInteger())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
yyval.ConstVal = ConstantExpr::get(yyvsp[-5].OtherOpVal, yyvsp[-3].ConstVal, yyvsp[-1].ConstVal);
@@ -4371,7 +4371,7 @@
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (!(*yyvsp[-3].TypeVal)->isIntegral() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() &&
+ if (!(*yyvsp[-3].TypeVal)->isInteger() && !(*yyvsp[-3].TypeVal)->isFloatingPoint() &&
!isa<PackedType>((*yyvsp[-3].TypeVal).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands!");
@@ -4395,9 +4395,9 @@
{
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*yyvsp[-3].TypeVal)->getDescription());
- if (!(*yyvsp[-3].TypeVal)->isIntegral()) {
+ if (!(*yyvsp[-3].TypeVal)->isInteger()) {
if (!isa<PackedType>(yyvsp[-3].TypeVal->get()) ||
- !cast<PackedType>(yyvsp[-3].TypeVal->get())->getElementType()->isIntegral())
+ !cast<PackedType>(yyvsp[-3].TypeVal->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
Value* tmpVal1 = getVal(*yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal);
@@ -4447,7 +4447,7 @@
{
if (yyvsp[0].ValueVal->getType() != Type::Int8Ty)
GEN_ERROR("Shift amount must be i8 type!");
- if (!yyvsp[-2].ValueVal->getType()->isIntegral())
+ if (!yyvsp[-2].ValueVal->getType()->isInteger())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
yyval.InstVal = new ShiftInst(yyvsp[-3].OtherOpVal, yyvsp[-2].ValueVal, yyvsp[0].ValueVal);
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.309 llvm/lib/AsmParser/llvmAsmParser.y:1.310
--- llvm/lib/AsmParser/llvmAsmParser.y:1.309 Sun Jan 14 20:00:29 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y Sun Jan 14 20:27:26 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->isIntegral())
+ if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
GEN_ERROR("Element type of a PackedType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2!");
@@ -1756,9 +1756,9 @@
| LogicalOps '(' ConstVal ',' ConstVal ')' {
if ($3->getType() != $5->getType())
GEN_ERROR("Logical operator types must match!");
- if (!$3->getType()->isIntegral()) {
+ if (!$3->getType()->isInteger()) {
if (!isa<PackedType>($3->getType()) ||
- !cast<PackedType>($3->getType())->getElementType()->isIntegral())
+ !cast<PackedType>($3->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
$$ = ConstantExpr::get($1, $3, $5);
@@ -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()->isIntegral())
+ if (!$3->getType()->isInteger())
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)->isIntegral() && !(*$2)->isFloatingPoint() &&
+ if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
!isa<PackedType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands!");
@@ -2594,9 +2594,9 @@
| LogicalOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
- if (!(*$2)->isIntegral()) {
+ if (!(*$2)->isInteger()) {
if (!isa<PackedType>($2->get()) ||
- !cast<PackedType>($2->get())->getElementType()->isIntegral())
+ !cast<PackedType>($2->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
Value* tmpVal1 = getVal(*$2, $3);
@@ -2637,7 +2637,7 @@
| ShiftOps ResolvedVal ',' ResolvedVal {
if ($4->getType() != Type::Int8Ty)
GEN_ERROR("Shift amount must be i8 type!");
- if (!$2->getType()->isIntegral())
+ if (!$2->getType()->isInteger())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
$$ = new ShiftInst($1, $2, $4);
Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.55 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.56
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.55 Sun Jan 14 20:12:07 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Sun Jan 14 20:27:26 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->isIntegral())
+ if (!ElemTy->isFloatingPoint() && !ElemTy->isInteger())
GEN_ERROR("Element type of a PackedType must be primitive");
if (!isPowerOf2_32($2))
GEN_ERROR("Vector length should be a power of 2!");
@@ -1756,9 +1756,9 @@
| LogicalOps '(' ConstVal ',' ConstVal ')' {
if ($3->getType() != $5->getType())
GEN_ERROR("Logical operator types must match!");
- if (!$3->getType()->isIntegral()) {
+ if (!$3->getType()->isInteger()) {
if (!isa<PackedType>($3->getType()) ||
- !cast<PackedType>($3->getType())->getElementType()->isIntegral())
+ !cast<PackedType>($3->getType())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
$$ = ConstantExpr::get($1, $3, $5);
@@ -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()->isIntegral())
+ if (!$3->getType()->isInteger())
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)->isIntegral() && !(*$2)->isFloatingPoint() &&
+ if (!(*$2)->isInteger() && !(*$2)->isFloatingPoint() &&
!isa<PackedType>((*$2).get()))
GEN_ERROR(
"Arithmetic operator requires integer, FP, or packed operands!");
@@ -2594,9 +2594,9 @@
| LogicalOps Types ValueRef ',' ValueRef {
if (!UpRefs.empty())
GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription());
- if (!(*$2)->isIntegral()) {
+ if (!(*$2)->isInteger()) {
if (!isa<PackedType>($2->get()) ||
- !cast<PackedType>($2->get())->getElementType()->isIntegral())
+ !cast<PackedType>($2->get())->getElementType()->isInteger())
GEN_ERROR("Logical operator requires integral operands!");
}
Value* tmpVal1 = getVal(*$2, $3);
@@ -2637,7 +2637,7 @@
| ShiftOps ResolvedVal ',' ResolvedVal {
if ($4->getType() != Type::Int8Ty)
GEN_ERROR("Shift amount must be i8 type!");
- if (!$2->getType()->isIntegral())
+ if (!$2->getType()->isInteger())
GEN_ERROR("Shift constant expression requires integer operand!");
CHECK_FOR_ERROR;
$$ = new ShiftInst($1, $2, $4);
More information about the llvm-commits
mailing list