about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm
diff options
context:
space:
mode:
authorflip1995 <philipp.krones@embecosm.com>2022-04-21 13:35:40 +0100
committerPhilipp Krones <hello@philkrones.com>2022-06-14 14:50:52 +0200
commit20f597ffcd29d71d116c617def76291689549d6c (patch)
treeef75823552206544327e02a1347a80c4d8996319 /compiler/rustc_codegen_llvm/src/llvm
parentdef3fd8e9224128ffdf4cb0a7f08306f757a059a (diff)
downloadrust-20f597ffcd29d71d116c617def76291689549d6c.tar.gz
rust-20f597ffcd29d71d116c617def76291689549d6c.zip
Add LLVM module flags required for the VFE opt
To apply the optimization the `Virtual Function Elim` module flag has to
be set. To apply this optimization post-link the `LTOPostLink` module
flag has to be set.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 1d9a4655db6..4f7b082dac4 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1936,6 +1936,7 @@ extern "C" {
         name: *const c_char,
         value: u32,
     );
+    pub fn LLVMRustHasModuleFlag(M: &Module, name: *const c_char, len: size_t) -> bool;
 
     pub fn LLVMRustMetadataAsValue<'a>(C: &'a Context, MD: &'a Metadata) -> &'a Value;