As @sammccall mentioned in D97109, I've extract the logic of creating Target and AuxTarget into a new function called createTargetAndAuxTarget.
Since there are many similar code in clang or other related tools, consolidating them into a single function may help others to maintain the logic handling target related things.
cuurent -> current
LangOpts seems maybe too narrow, just options?