[PATCH] MachO: Move LayoutPass to MachO directory.
ruiu at google.com
Fri Jan 30 19:27:48 PST 2015
It's not correct to say we need that pass to layout atoms for order file. It's perhaps needless to say, but the LayoutPass is not the only way to sort atoms. If we need to sort atoms in some order, we can add code to elf::OrderPass to directly sort atoms in that pass.
That would be so much easier than hacking with layout references for the LayoutPass to let the LayoutPass to interpret that result.
It's just like the InputGraph design that we have just eliminated. We had complex code to set up data for the InputGraph, and the InputGraph does some very complex thing in it. That was not a good design after all, so let's not over-think this time too. When we need to tweak sort order, we can always change "compare" function in elf::OrderPass.
More information about the llvm-commits