[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Aug 15 03:47:45 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.88 -> 1.89
---
Log message:
When comparing against null use the other value's type to get the null
constant.
---
Diffs of the changes: (+1 -1)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.88 llvm-java/lib/Compiler/Compiler.cpp:1.89
--- llvm-java/lib/Compiler/Compiler.cpp:1.88 Sun Aug 15 05:42:34 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Sun Aug 15 05:47:34 2004
@@ -856,8 +856,8 @@
void do_if(unsigned bcI, JSetCC cc, JType type,
unsigned t, unsigned f) {
- Value* v2 = llvm::Constant::getNullValue(getType(type));
Value* v1 = opStack_.top(); opStack_.pop();
+ Value* v2 = llvm::Constant::getNullValue(v1->getType());
Value* c = new SetCondInst(getSetCC(cc), v1, v2, TMP, getBBAt(bcI));
new BranchInst(getBBAt(t), getBBAt(f), c, getBBAt(bcI));
}
More information about the llvm-commits
mailing list