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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user