[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Reid Spencer
reid at x10sys.com
Mon Dec 11 15:20:36 PST 2006
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.212 -> 1.213
---
Log message:
Create the cast constant expression that was read instead of attempting
to infer the cast from its operand and type. This fixes:
test/Regression/Bytecode/2006-12-11-Cast-ConstExpr.ll
---
Diffs of the changes: (+2 -1)
Reader.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.212 llvm/lib/Bytecode/Reader/Reader.cpp:1.213
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.212 Fri Dec 8 12:06:15 2006
+++ llvm/lib/Bytecode/Reader/Reader.cpp Mon Dec 11 17:20:20 2006
@@ -1325,7 +1325,8 @@
if (!Instruction::isCast(Opcode))
error("Only cast instruction has one argument for ConstantExpr");
- Constant *Result = ConstantExpr::getCast(ArgVec[0], getType(TypeID));
+ Constant *Result = ConstantExpr::getCast(Opcode, ArgVec[0],
+ getType(TypeID));
if (Handler) Handler->handleConstantExpression(Opcode, ArgVec, Result);
return Result;
} else if (Opcode == Instruction::GetElementPtr) { // GetElementPtr
More information about the llvm-commits
mailing list