mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
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 llvm-svn: 32450
This commit is contained in:
parent
ae700cd02a
commit
0ed6e66cf3
@ -1325,7 +1325,8 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user