[PATCH] D17552: Pass -backend-option to LLVM when there is no target machine
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 26 08:17:54 PST 2016
yaxunl added a comment.
I found this issue when investigating some codegen issues in Clang -cc1 with -emit-llvm. I need to pass an llvm option -print-after-all to the LLVM pass manager which is used to run the optimization passes before emitting llvm. However it did not work. Then I found ParseCommandLineOptions was only called when target machine was set. I fixed this by always call ParseCommandLineOptions even though there is no target machine.
This bug causes difficulty for OpenCL since it is usually compiled without target machine.
Could you please review this? Thanks.
More information about the cfe-commits