mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Fix a bug where ICmpInst objects instantiated directly with a name would
not retain that name. Not noticed because AsmParser always sets name after construction. However, llvm2cpp noticed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4d26a0619d
commit
97c0e2107b
@ -2070,6 +2070,7 @@ CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
|||||||
Ops[0].init(LHS, this);
|
Ops[0].init(LHS, this);
|
||||||
Ops[1].init(RHS, this);
|
Ops[1].init(RHS, this);
|
||||||
SubclassData = predicate;
|
SubclassData = predicate;
|
||||||
|
setName(Name);
|
||||||
if (op == Instruction::ICmp) {
|
if (op == Instruction::ICmp) {
|
||||||
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
|
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
|
||||||
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
|
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
|
||||||
@ -2093,7 +2094,6 @@ CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
|||||||
// Check that the operands are the right type
|
// Check that the operands are the right type
|
||||||
assert(Op0Ty->isFloatingPoint() &&
|
assert(Op0Ty->isFloatingPoint() &&
|
||||||
"Invalid operand types for FCmp instruction");
|
"Invalid operand types for FCmp instruction");
|
||||||
setName(Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
||||||
@ -2102,6 +2102,7 @@ CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
|||||||
Ops[0].init(LHS, this);
|
Ops[0].init(LHS, this);
|
||||||
Ops[1].init(RHS, this);
|
Ops[1].init(RHS, this);
|
||||||
SubclassData = predicate;
|
SubclassData = predicate;
|
||||||
|
setName(Name);
|
||||||
if (op == Instruction::ICmp) {
|
if (op == Instruction::ICmp) {
|
||||||
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
|
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
|
||||||
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
|
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
|
||||||
@ -2126,7 +2127,6 @@ CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
|
|||||||
// Check that the operands are the right type
|
// Check that the operands are the right type
|
||||||
assert(Op0Ty->isFloatingPoint() &&
|
assert(Op0Ty->isFloatingPoint() &&
|
||||||
"Invalid operand types for FCmp instruction");
|
"Invalid operand types for FCmp instruction");
|
||||||
setName(Name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CmpInst *
|
CmpInst *
|
||||||
|
Loading…
x
Reference in New Issue
Block a user