Currently the code-model does not get saved in the module IR, so if a code model is specified when compiling with LTO, it gets lost and is not propagated properly to LTO. This patch does what is necessary in the front end to pass the code-model to the module, so that the back end can store it in the Module (see https://reviews.llvm.org/D52322 for the back-end patch).
Depends on https://reviews.llvm.org/D52322
Fixes PR33306.
Can you simplify by using a single constant for both of these (since handling the same)?