mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
[opaque pointer type] Explicit pointee type for call instruction
Use an extra bit in the CCInfo to flag the newer version of the instructiont hat includes the type explicitly. Tested the newer error cases I added, but didn't add tests for the finer granularity improvements to existing error paths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235160 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1935,14 +1935,14 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
|
||||
break;
|
||||
case Instruction::Call: {
|
||||
const CallInst &CI = cast<CallInst>(I);
|
||||
PointerType *PTy = cast<PointerType>(CI.getCalledValue()->getType());
|
||||
FunctionType *FTy = cast<FunctionType>(PTy->getElementType());
|
||||
FunctionType *FTy = CI.getFunctionType();
|
||||
|
||||
Code = bitc::FUNC_CODE_INST_CALL;
|
||||
|
||||
Vals.push_back(VE.getAttributeID(CI.getAttributes()));
|
||||
Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()) |
|
||||
unsigned(CI.isMustTailCall()) << 14);
|
||||
unsigned(CI.isMustTailCall()) << 14 | 1 << 15);
|
||||
Vals.push_back(VE.getTypeID(FTy));
|
||||
PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee
|
||||
|
||||
// Emit value #'s for the fixed parameters.
|
||||
|
Reference in New Issue
Block a user