aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-22 21:04:42 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-22 21:04:42 +0000
commit213e557cef3e653e2d3a00b07b137c143128430a (patch)
tree2b864d830fba118c8d2fa07144629603caf85214 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentd0a4c62a031ea9f0e2be2fe1f16af2209602ed94 (diff)
If we support structs as va_list, we must pass pointers to them to va_copy
See last commit for LangRef, this implements it on all targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 0c94ea74cd..fa6d6d4d14 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -855,10 +855,11 @@ SDOperand TargetLowering::LowerVAEnd(SDOperand Chain, SDOperand L,
std::pair<SDOperand,SDOperand>
TargetLowering::LowerVACopy(SDOperand Chain, SDOperand Src, SDOperand Dest,
SelectionDAG &DAG) {
- // We have no sane default behavior, just emit a useful error message and bail
- // out.
- std::cerr << "Variable arguments handling not implemented on this target!\n";
- abort();
+ //Default to returning the input list
+ SDOperand Val = DAG.getLoad(getPointerTy(), Chain, Src, DAG.getSrcValue(NULL));
+ SDOperand Result = DAG.getNode(ISD::STORE, MVT::Other, Val.getValue(1),
+ Val, Dest, DAG.getSrcValue(NULL));
+ return std::make_pair(Result, Result);
}
std::pair<SDOperand,SDOperand>