summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-01-20 17:46:04 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-01-20 17:46:04 +0000
commitddea0ade30393a5f86fbcac0c62e580b0f4e35ee (patch)
treebf4eea5017e468259562a30fcdbb6a87e6846b1c /clang/lib/CodeGen/CodeGenFunction.cpp
parent63f9e249ba134a2c00b5457ebd52ec21088298a9 (diff)
Slight cleanup, and fix for va_arg on architectures where va_list is a
struct. llvm-svn: 62585
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index c1a34389b8d0..2fd8d638d657 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/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();
+}