Bitcode support for allocas with arbitrary array size types.
[oota-llvm.git] / lib / Bitcode / Writer / BitcodeWriter.cpp
index d91696f0e0a5ee0c40d17f55cdd7f378c18e4632..860b7e9a68ea2018844666344648420fed3c947c 100644 (file)
@@ -1114,6 +1114,7 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
   case Instruction::Alloca:
     Code = bitc::FUNC_CODE_INST_ALLOCA;
     Vals.push_back(VE.getTypeID(I.getType()));
+    Vals.push_back(VE.getTypeID(I.getOperand(0)->getType()));
     Vals.push_back(VE.getValueID(I.getOperand(0))); // size.
     Vals.push_back(Log2_32(cast<AllocaInst>(I).getAlignment())+1);
     break;