aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/ConstantReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-05 19:53:03 +0000
committerChris Lattner <sabre@nondot.org>2003-11-05 19:53:03 +0000
commit29e3b2ba77e487cd595185ad11dbba71c45fb42f (patch)
treeb1f00119f5a64664af8b1c3b9d5b570be258907d /lib/Bytecode/Reader/ConstantReader.cpp
parent80f0b57b5d101f5b52d803c570dc74cca47e53f9 (diff)
Add support for constant expr shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r--lib/Bytecode/Reader/ConstantReader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index 097bdbe126..00f44b3665 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -182,6 +182,8 @@ 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::Shl || Opcode == Instruction::Shr) {
+ return ConstantExpr::getShift(Opcode, ArgVec[0], ArgVec[1]);
} else { // All other 2-operand expressions
return ConstantExpr::get(Opcode, ArgVec[0], ArgVec[1]);
}