diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-01-20 17:46:04 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-01-20 17:46:04 +0000 |
commit | 4fd0aa5803357d8c72eeac2cae15e12649ea08fe (patch) | |
tree | 8c1af2d6cf9dabb266227b5f5bb02cb7999c70b3 /lib/CodeGen/CodeGenFunction.cpp | |
parent | c96c0511501190b631664ca556c0bf85537095d3 (diff) |
Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index c1a34389b8..2fd8d638d6 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -460,3 +460,10 @@ llvm::Value *CodeGenFunction::EmitVLASize(QualType Ty) return 0; } + +llvm::Value* CodeGenFunction::EmitVAListRef(const Expr* E) { + if (CGM.getContext().getBuiltinVaListType()->isArrayType()) { + return EmitScalarExpr(E); + } + return EmitLValue(E).getAddress(); +} |