Add support for storing code model to LLVM module IR
This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on https://github.com/rust-lang/rust/pull/74002
This commit is contained in:
parent
4a8b6f708c
commit
8357e57346
5 changed files with 36 additions and 1 deletions
|
@ -2326,6 +2326,7 @@ extern "C" {
|
|||
pub fn LLVMRustUnsetComdat(V: &Value);
|
||||
pub fn LLVMRustSetModulePICLevel(M: &Module);
|
||||
pub fn LLVMRustSetModulePIELevel(M: &Module);
|
||||
pub fn LLVMRustSetModuleCodeModel(M: &Module, Model: CodeModel);
|
||||
pub fn LLVMRustModuleBufferCreate(M: &Module) -> &'static mut ModuleBuffer;
|
||||
pub fn LLVMRustModuleBufferPtr(p: &ModuleBuffer) -> *const u8;
|
||||
pub fn LLVMRustModuleBufferLen(p: &ModuleBuffer) -> usize;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue