mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Add support for extern varargs methods & varargs method calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -28,6 +28,9 @@ void BytecodeWriter::outputType(const Type *T) {
|
||||
assert(Slot != -1 && "Type used but not available!!");
|
||||
output_vbr((unsigned)Slot, Out);
|
||||
|
||||
// Output the number of arguments to method (+1 if varargs):
|
||||
output_vbr(MT->getParamTypes().size()+MT->isVarArg(), Out);
|
||||
|
||||
// Output all of the arguments...
|
||||
MethodType::ParamTypes::const_iterator I = MT->getParamTypes().begin();
|
||||
for (; I != MT->getParamTypes().end(); ++I) {
|
||||
@ -36,8 +39,9 @@ void BytecodeWriter::outputType(const Type *T) {
|
||||
output_vbr((unsigned)Slot, Out);
|
||||
}
|
||||
|
||||
// Terminate list with VoidTy
|
||||
output_vbr((unsigned)Type::VoidTy->getPrimitiveID(), Out);
|
||||
// Terminate list with VoidTy if we are a varargs function...
|
||||
if (MT->isVarArg())
|
||||
output_vbr((unsigned)Type::VoidTy->getPrimitiveID(), Out);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user