[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp
Reid Spencer
reid at x10sys.com
Wed Apr 11 06:05:05 PDT 2007
Changes in directory llvm/lib/VMCore:
Instructions.cpp updated: 1.83 -> 1.84
---
Log message:
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.
---
Diffs of the changes: (+2 -2)
Instructions.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.83 llvm/lib/VMCore/Instructions.cpp:1.84
--- llvm/lib/VMCore/Instructions.cpp:1.83 Mon Apr 9 13:00:57 2007
+++ llvm/lib/VMCore/Instructions.cpp Wed Apr 11 08:04:48 2007
@@ -2070,6 +2070,7 @@
Ops[0].init(LHS, this);
Ops[1].init(RHS, this);
SubclassData = predicate;
+ setName(Name);
if (op == Instruction::ICmp) {
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
@@ -2093,7 +2094,6 @@
// Check that the operands are the right type
assert(Op0Ty->isFloatingPoint() &&
"Invalid operand types for FCmp instruction");
- setName(Name);
}
CmpInst::CmpInst(OtherOps op, unsigned short predicate, Value *LHS, Value *RHS,
@@ -2102,6 +2102,7 @@
Ops[0].init(LHS, this);
Ops[1].init(RHS, this);
SubclassData = predicate;
+ setName(Name);
if (op == Instruction::ICmp) {
assert(predicate >= ICmpInst::FIRST_ICMP_PREDICATE &&
predicate <= ICmpInst::LAST_ICMP_PREDICATE &&
@@ -2126,7 +2127,6 @@
// Check that the operands are the right type
assert(Op0Ty->isFloatingPoint() &&
"Invalid operand types for FCmp instruction");
- setName(Name);
}
CmpInst *
More information about the llvm-commits
mailing list