simplify MorphNodeTo to take a VTList operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33868 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-02-04 02:41:42 +00:00
parent 67612a1188
commit 48b8592652
2 changed files with 17 additions and 21 deletions

View File

@@ -970,10 +970,10 @@ protected:
/// MorphNodeTo - This clears the return value and operands list, and sets the
/// opcode of the node to the specified value. This should only be used by
/// the SelectionDAG class.
void MorphNodeTo(unsigned Opc) {
void MorphNodeTo(unsigned Opc, SDVTList L) {
NodeType = Opc;
ValueList = 0;
NumValues = 0;
ValueList = L.VTs;
NumValues = L.NumVTs;
// Clear the operands list, updating used nodes to remove this from their
// use list.
@@ -1058,10 +1058,7 @@ class HandleSDNode : public SDNode {
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
public:
HandleSDNode(SDOperand X) : SDNode(ISD::HANDLENODE, X) {}
~HandleSDNode() {
MorphNodeTo(ISD::HANDLENODE); // Drops operand uses.
}
~HandleSDNode();
SDOperand getValue() const { return getOperand(0); }
};