[clang][NFC] Extract Target and AuxTarget creation in CompilerInstance to new function
authorYu-Hsun Chiang <ty1208chiang@gmail.com>
Fri, 26 Feb 2021 08:12:32 +0000 (09:12 +0100)
committerSam McCall <sam.mccall@gmail.com>
Fri, 26 Feb 2021 08:29:11 +0000 (09:29 +0100)
commitd412dbe388819dd68bbe4a3967783fdf80400860
tree947222f1a754621cba0b06caac7e92605f919078
parent2a42c759ae7bb09dd448d188138f310d014fcab6
[clang][NFC] Extract Target and AuxTarget creation in CompilerInstance to new function

As @sammccall mentioned in [[ https://reviews.llvm.org/D97109 | 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.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D97493
clang/include/clang/Frontend/CompilerInstance.h
clang/lib/Frontend/CompilerInstance.cpp