llvm-profgen: Parse command line arguments after initializing targets
authorTom Stellard <tstellar@redhat.com>
Mon, 21 Dec 2020 21:29:56 +0000 (13:29 -0800)
committerTom Stellard <tstellar@redhat.com>
Mon, 21 Dec 2020 23:13:10 +0000 (15:13 -0800)
commit4ad0cfd4de414f9bedf48ec1034e663fe59efee4
tree0056d6bac6fd2cb1837d46e70d34afc6b48fa1b1
parentbe961374611a4be1b042cce7e6cc4cd12a1b4fd7
llvm-profgen: Parse command line arguments after initializing targets

I am experimenting with turning backends into loadable modules and in
that scenario, target specific command line arguments won't be available
until after the targets are initialized.

Also, most other tools initialize targets before parsing arguments.

Reviewed By: wlei

Differential Revision: https://reviews.llvm.org/D93348
llvm/tools/llvm-profgen/llvm-profgen.cpp