Fix a bug I introduced yesterday, which broke functions with *no* arguments.
authorChris Lattner <sabre@nondot.org>
Tue, 16 May 2006 17:08:35 +0000 (17:08 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 May 2006 17:08:35 +0000 (17:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index 3c4dd2b60ec1ca7d102c9d798df5eb905c40bb5e..1971adae73720f5658c6edb4bd4056f29845443b 100644 (file)
@@ -542,6 +542,9 @@ void X86TargetLowering::LowerCCCArguments(SDOperand Op, SelectionDAG &DAG) {
     }
     FormalArgs.push_back(ArgValue);
   }
+  // Provide a chain.  Note that this isn't the right one, but it works as well
+  // as before.
+  FormalArgs.push_back(DAG.getEntryNode());
 }
 
 std::pair<SDOperand, SDOperand>
@@ -1081,6 +1084,10 @@ X86TargetLowering::LowerFastCCArguments(SDOperand Op, SelectionDAG &DAG) {
     }
     FormalArgs.push_back(ArgValue);
   }
+
+  // Provide a chain.  Note that this isn't the right one, but it works as well
+  // as before.
+  FormalArgs.push_back(DAG.getEntryNode());
 }
 
 std::pair<SDOperand, SDOperand>