forked from OSchip/llvm-project
Renamed get.*Operator to create seeing that it would have to be qualified
with the classname anyways. llvm-svn: 74
This commit is contained in:
parent
7221d33514
commit
31e23cdeb4
llvm/lib
|
@ -1879,7 +1879,7 @@ case 114:
|
|||
case 115:
|
||||
#line 868 "llvmAsmParser.y"
|
||||
{
|
||||
yyval.InstVal = BinaryOperator::getBinaryOperator(yyvsp[-4].BinaryOpVal, getVal(yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal), getVal(yyvsp[-3].TypeVal, yyvsp[0].ValIDVal));
|
||||
yyval.InstVal = BinaryOperator::create(yyvsp[-4].BinaryOpVal, getVal(yyvsp[-3].TypeVal, yyvsp[-2].ValIDVal), getVal(yyvsp[-3].TypeVal, yyvsp[0].ValIDVal));
|
||||
if (yyval.InstVal == 0)
|
||||
ThrowException("binary operator returned null!");
|
||||
;
|
||||
|
@ -1887,7 +1887,7 @@ case 115:
|
|||
case 116:
|
||||
#line 873 "llvmAsmParser.y"
|
||||
{
|
||||
yyval.InstVal = UnaryOperator::getUnaryOperator(yyvsp[-2].UnaryOpVal, getVal(yyvsp[-1].TypeVal, yyvsp[0].ValIDVal));
|
||||
yyval.InstVal = UnaryOperator::create(yyvsp[-2].UnaryOpVal, getVal(yyvsp[-1].TypeVal, yyvsp[0].ValIDVal));
|
||||
if (yyval.InstVal == 0)
|
||||
ThrowException("unary operator returned null!");
|
||||
;
|
||||
|
|
|
@ -866,12 +866,12 @@ ValueRefList : Types ValueRef { // Used for call statements...
|
|||
ValueRefListE : ValueRefList | /*empty*/ { $$ = 0; }
|
||||
|
||||
InstVal : BinaryOps Types ValueRef ',' ValueRef {
|
||||
$$ = BinaryOperator::getBinaryOperator($1, getVal($2, $3), getVal($2, $5));
|
||||
$$ = BinaryOperator::create($1, getVal($2, $3), getVal($2, $5));
|
||||
if ($$ == 0)
|
||||
ThrowException("binary operator returned null!");
|
||||
}
|
||||
| UnaryOps Types ValueRef {
|
||||
$$ = UnaryOperator::getUnaryOperator($1, getVal($2, $3));
|
||||
$$ = UnaryOperator::create($1, getVal($2, $3));
|
||||
if ($$ == 0)
|
||||
ThrowException("unary operator returned null!");
|
||||
}
|
||||
|
|
|
@ -93,13 +93,12 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
|
|||
|
||||
if (Raw.Opcode >= Instruction::FirstUnaryOp &&
|
||||
Raw.Opcode < Instruction::NumUnaryOps && Raw.NumOperands == 1) {
|
||||
Res = UnaryOperator::getUnaryOperator(Raw.Opcode,getValue(Raw.Ty,Raw.Arg1));
|
||||
Res = UnaryOperator::create(Raw.Opcode,getValue(Raw.Ty,Raw.Arg1));
|
||||
return false;
|
||||
} else if (Raw.Opcode >= Instruction::FirstBinaryOp &&
|
||||
Raw.Opcode < Instruction::NumBinaryOps && Raw.NumOperands == 2) {
|
||||
Res = BinaryOperator::getBinaryOperator(Raw.Opcode,
|
||||
getValue(Raw.Ty, Raw.Arg1),
|
||||
getValue(Raw.Ty, Raw.Arg2));
|
||||
Res = BinaryOperator::create(Raw.Opcode, getValue(Raw.Ty, Raw.Arg1),
|
||||
getValue(Raw.Ty, Raw.Arg2));
|
||||
return false;
|
||||
} else if (Raw.Opcode == Instruction::PHINode) {
|
||||
PHINode *PN = new PHINode(Raw.Ty);
|
||||
|
|
Loading…
Reference in New Issue