// Mike Maxim
// IRTree for labels

package edu.cmu.cs.l3.tree;

import java.util.Iterator;
import edu.cmu.cs.l3.temp.*;

public class IRLabel extends IRStatement {

    public IRLabel(Label l) {
	m_label = l;

	m_classname = "IRLabel";
    }

    public Label getLabel() {
	return m_label;
    }

    public String toString() {
	//String loopstr = "";
	//for(Iterator it = loops.iterator(); it.hasNext(); ) {
	//    loopstr += it.next().toString();
	//    loopstr += " ";
	//}
	return "LABEL("+m_label.toString()+")"; // loops: " + loopstr;
    }

    public IRExpressionList getComponents() {
	return new IRExpressionList();
    }

    public IRStatement build(IRExpressionList comps) {
	return new IRLabel(m_label);
    }

    private Label m_label;

}

