about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-07-24 18:56:31 +0900
committerGitHub <noreply@github.com>2020-07-24 18:56:31 +0900
commita02aecba211ba82e79350db9e4dcd2675fd79423 (patch)
treecda4a8b95d8da7fac22116e16afec0294a688bfb /src/librustc_codegen_llvm
parenta816345536b1651bd05d9b9a8eed6db043a5e14d (diff)
parent40b6bccd6431e5d3032279ec5f6d269cacc7fe9b (diff)
Rollup merge of #74623 - lcnr:polymorphize-functions, r=eddyb
polymorphize GlobalAlloc::Function

this sadly does not change #74614

r? @eddyb
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/common.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs
index 0e1cd8e493d..2a50d4a46d2 100644
--- a/src/librustc_codegen_llvm/common.rs
+++ b/src/librustc_codegen_llvm/common.rs
@@ -257,7 +257,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
                         (value, AddressSpace::DATA)
                     }
                     GlobalAlloc::Function(fn_instance) => (
-                        self.get_fn_addr(fn_instance),
+                        self.get_fn_addr(fn_instance.polymorphize(self.tcx)),
                         self.data_layout().instruction_address_space,
                     ),
                     GlobalAlloc::Static(def_id) => {