Sometimes a backend needs to apply certain target-specific passes before linking. These passes sit in target directory and Clang needs a way to access them.
This patch attempts to expose target-specific pre-linking passes by adding a virtual member function addPreLinkPasses to TargetMachine.
The link to the discussion in cfe-dev about pre-linking passes is here:
http://lists.llvm.org/pipermail/cfe-dev/2016-May/048822.html
The related Clang change is here:
The comment is not very useful, it basically repeats the function name and would still let me puzzled.
I read the thread on cfe-dev, but I'm still don't really sure to understand where it would be called, do you have the clang patch ready?