The darwin linker operates differently than the gnu linker with respect to libraries. The darwin linker first links in all object files from the command line, then to resolve any remaining undefines, it repeatedly iterates over libraries on the command line until either all undefines are resolved or no undefines were resolved in the last pass.
When Shankar made the InputGraph model, the plan for darwin was for the darwin driver to place all libraries in a group at the end of the InputGraph. Thus making the darwin model a subset of the gnu model. But it turns out that does not work because the driver cannot tell if a file is an object or library until it has been loaded, which happens later.
My next thought was to "sort" the graph after all input files had been opened. The problem with that is that a yaml file can contain a mix of object files and library files and there is no way to sort out the sub files of an InputElement.
This solution is to subclass InputGraph for darwin and just iterate the graph the way darwin linker needs.
BTW, I was hoping to also rework the graph walk to be more C++11 styled and use a separate iterator with begin/end. But the notifyProgess() model does not fit in because it would need to be a method on the iterator object and C++11 hides that.