[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ConstantReader.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 30 20:55:01 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
ConstantReader.cpp updated: 1.74 -> 1.75
---
Log message:
Add support for reading constantexpr select instructions
---
Diffs of the changes: (+3 -0)
Index: llvm/lib/Bytecode/Reader/ConstantReader.cpp
diff -u llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.74 llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.75
--- llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.74 Mon Feb 9 11:20:52 2004
+++ llvm/lib/Bytecode/Reader/ConstantReader.cpp Tue Mar 30 20:53:59 2004
@@ -165,6 +165,9 @@
} 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]);
}
More information about the llvm-commits
mailing list