[opaque pointer type] bitcode: add explicit callee type to invoke instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-04-24 18:06:06 +00:00
parent 1dd6b024a2
commit c5b1f0a49d
5 changed files with 33 additions and 18 deletions

View File

@ -1790,15 +1790,15 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
case Instruction::Invoke: {
const InvokeInst *II = cast<InvokeInst>(&I);
const Value *Callee(II->getCalledValue());
PointerType *PTy = cast<PointerType>(Callee->getType());
FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
const Value *Callee = II->getCalledValue();
FunctionType *FTy = II->getFunctionType();
Code = bitc::FUNC_CODE_INST_INVOKE;
Vals.push_back(VE.getAttributeID(II->getAttributes()));
Vals.push_back(II->getCallingConv());
Vals.push_back(II->getCallingConv() | 1 << 13);
Vals.push_back(VE.getValueID(II->getNormalDest()));
Vals.push_back(VE.getValueID(II->getUnwindDest()));
Vals.push_back(VE.getTypeID(FTy));
PushValueAndType(Callee, InstID, Vals, VE);
// Emit value #'s for the fixed parameters.