summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-01-20 07:46:22 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-01-20 07:46:22 +0000
commit08c5dabf1b172f5f57c014befadd55180b2f734b (patch)
tree17984c8af07ac4b2209d7623cfc96b39bec275f8 /clang/lib/CodeGen/CGBuiltin.cpp
parent6cdcf1eb73759ba5dc2e0d38f885046ca7ff75c6 (diff)
downloadbcm5719-llvm-08c5dabf1b172f5f57c014befadd55180b2f734b.tar.gz
bcm5719-llvm-08c5dabf1b172f5f57c014befadd55180b2f734b.zip
Fix for PR3350: add special-casing for "references" to va_lists in
builtins. Also, a minor tweak to va_copy for consistency. llvm-svn: 62574
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 6e140da7323..2d840ffd8d6 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -67,11 +67,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
case Builtin::BI__builtin_va_copy: {
// FIXME: This does not yet handle architectures where va_list is a struct.
Value *DstPtr = EmitLValue(E->getArg(0)).getAddress();
- Value *SrcValue = EmitScalarExpr(E->getArg(1));
-
- Value *SrcPtr = CreateTempAlloca(SrcValue->getType(), "dst_ptr");
-
- Builder.CreateStore(SrcValue, SrcPtr, false);
+ Value *SrcPtr = EmitLValue(E->getArg(1)).getAddress();
const llvm::Type *Type =
llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
OpenPOWER on IntegriCloud