Pass code-model through Module IR to LTO which will use it.
authorCaroline Tice <cmtice@google.com>
Fri, 21 Sep 2018 18:41:31 +0000 (18:41 +0000)
committerCaroline Tice <cmtice@google.com>
Fri, 21 Sep 2018 18:41:31 +0000 (18:41 +0000)
commit3dea3f9e0a7e2c72ff7e109d1581b62365fc7ae8
treeae18be7979a8f0730ee13cb221f15961824720ff
parent8a59dbf7fd73f28792f605c059e5cea189e0c587
Pass code-model through Module IR to LTO which will use it.

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,
along with one for the front end, fixes that.

Differential Revision: https://reviews.llvm.org/D52322

llvm-svn: 342760
llvm/include/llvm/IR/Module.h
llvm/lib/IR/Module.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/test/LTO/X86/Inputs/codemodel-3.ll [new file with mode: 0644]
llvm/test/LTO/X86/codemodel-1.ll [new file with mode: 0644]
llvm/test/LTO/X86/codemodel-2.ll [new file with mode: 0644]
llvm/test/LTO/X86/codemodel-3.ll [new file with mode: 0644]