mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 07:14:53 +00:00
Add support for reading constantexpr select instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12563 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
92e84229e1
commit
1e490ba4cd
@ -165,6 +165,9 @@ Constant *BytecodeParser::parseConstantValue(const unsigned char *&Buf,
|
||||
} else if (Opcode == Instruction::GetElementPtr) { // GetElementPtr
|
||||
std::vector<Constant*> IdxList(ArgVec.begin()+1, ArgVec.end());
|
||||
return ConstantExpr::getGetElementPtr(ArgVec[0], IdxList);
|
||||
} else if (Opcode == Instruction::Select) {
|
||||
assert(ArgVec.size() == 3);
|
||||
return ConstantExpr::getSelect(ArgVec[0], ArgVec[1], ArgVec[2]);
|
||||
} else { // All other 2-operand expressions
|
||||
return ConstantExpr::get(Opcode, ArgVec[0], ArgVec[1]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user