[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Andrew Lenharth alenhar2 at cs.uiuc.edu
Wed Jun 22 14:04:55 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.61 -> 1.62
---
Log message:

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.




---
Diffs of the changes:  (+5 -4)

 SelectionDAGISel.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.61 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.62
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.61	Sat Jun 18 13:34:51 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Wed Jun 22 16:04:42 2005
@@ -855,10 +855,11 @@
 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>






More information about the llvm-commits mailing list