Get rid of native_library projection queries
They don't seem particularly useful as I don't expect native libraries to change frequently.
This commit is contained in:
parent
d7dd01fe8b
commit
ccc54613c3
7 changed files with 18 additions and 25 deletions
|
@ -332,7 +332,10 @@ impl<'ll> CodegenCx<'ll, '_> {
|
|||
}
|
||||
}
|
||||
|
||||
if self.use_dll_storage_attrs && self.tcx.is_dllimport_foreign_item(def_id) {
|
||||
if self.use_dll_storage_attrs
|
||||
&& let Some(library) = self.tcx.native_library(def_id)
|
||||
&& library.kind.is_dllimport()
|
||||
{
|
||||
// For foreign (native) libs we know the exact storage type to use.
|
||||
unsafe {
|
||||
llvm::LLVMSetDLLStorageClass(g, llvm::DLLStorageClass::DllImport);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue