[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Chris Lattner
lattner at cs.uiuc.edu
Fri Oct 17 00:12:01 PDT 2003
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.132 -> 1.133
---
Log message:
Tighten up handling of checks for shift instructions
---
Diffs of the changes: (+4 -2)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.132 llvm/lib/AsmParser/llvmAsmParser.y:1.133
--- llvm/lib/AsmParser/llvmAsmParser.y:1.132 Thu Oct 16 15:12:13 2003
+++ llvm/lib/AsmParser/llvmAsmParser.y Fri Oct 17 00:11:44 2003
@@ -1093,8 +1093,8 @@
| ShiftOps '(' ConstVal ',' ConstVal ')' {
if ($5->getType() != Type::UByteTy)
ThrowException("Shift count for shift constant must be unsigned byte!");
- if (!$3->getType()->isIntegral())
- ThrowException("Shift constant expression requires integral operand!");
+ if (!$3->getType()->isInteger())
+ ThrowException("Shift constant expression requires integer operand!");
$$ = ConstantExpr::getShift($1, $3, $5);
};
@@ -1631,6 +1631,8 @@
| ShiftOps ResolvedVal ',' ResolvedVal {
if ($4->getType() != Type::UByteTy)
ThrowException("Shift amount must be ubyte!");
+ if (!$2->getType()->isInteger())
+ ThrowException("Shift constant expression requires integer operand!");
$$ = new ShiftInst($1, $2, $4);
}
| CAST ResolvedVal TO Types {
More information about the llvm-commits
mailing list