[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Evan Cheng
evan.cheng at apple.com
Tue May 23 14:08:36 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86ISelLowering.cpp updated: 1.209 -> 1.210
---
Log message:
Better way to check for vararg.
---
Diffs of the changes: (+2 -1)
X86ISelLowering.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/X86/X86ISelLowering.cpp
diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.209 llvm/lib/Target/X86/X86ISelLowering.cpp:1.210
--- llvm/lib/Target/X86/X86ISelLowering.cpp:1.209 Tue May 23 16:06:34 2006
+++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue May 23 16:08:24 2006
@@ -497,7 +497,8 @@
// 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.
- if (MF.getFunction()->isVarArg())
+ bool isVarArg = cast<ConstantSDNode>(Op.getOperand(2))->getValue() != 0;
+ if (isVarArg)
VarArgsFrameIndex = MFI->CreateFixedObject(1, ArgOffset);
ReturnAddrIndex = 0; // No return address slot generated yet.
BytesToPopOnReturn = 0; // Callee pops nothing.
More information about the llvm-commits
mailing list