mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Better way to check for vararg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28440 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25caf63cd2
commit
4db3af3511
@ -497,7 +497,8 @@ SDOperand X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG)
|
|||||||
|
|
||||||
// If the function takes variable number of arguments, make a frame index for
|
// If the function takes variable number of arguments, make a frame index for
|
||||||
// the start of the first vararg value... for expansion of llvm.va_start.
|
// the start of the first vararg value... for expansion of llvm.va_start.
|
||||||
if (MF.getFunction()->isVarArg())
|
bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
|
||||||
|
if (isVarArg)
|
||||||
VarArgsFrameIndex = MFI->CreateFixedObject(1, ArgOffset);
|
VarArgsFrameIndex = MFI->CreateFixedObject(1, ArgOffset);
|
||||||
ReturnAddrIndex = 0; // No return address slot generated yet.
|
ReturnAddrIndex = 0; // No return address slot generated yet.
|
||||||
BytesToPopOnReturn = 0; // Callee pops nothing.
|
BytesToPopOnReturn = 0; // Callee pops nothing.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user