[llvm-link] Fix options of llvm-link
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Tue, 22 Nov 2022 02:03:30 +0000 (18:03 -0800)
committerStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Tue, 22 Nov 2022 02:08:27 +0000 (18:08 -0800)
commita2dc9f367c6be90589626a575f61ebea5409eee0
treef4d7ee904f671cea92db6f6a6c342ec9ac6e7d40
parent9d09982641fa7bb436bf86de33ecb26a8ed63865
[llvm-link] Fix options of llvm-link

This tool only parsed options after creating the LLVMContext.
Unfortunately, this means that some options, such as --opaque-pointers,
which are read when the LLVMContext is created are impossible to
set from the command line.  This patch moves the LLVMContext creation
after the option parsing.
llvm/tools/llvm-link/llvm-link.cpp