about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/callee.rs
AgeCommit message (Collapse)AuthorLines
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-1/+1
2025-07-16use `codegen_instance_attrs` where an instance is (easily) availableFolkert de Vries-1/+1
2025-05-09don't depend on rustc_attr_parsing if rustc_data_structures will domejrs-1/+1
2025-02-20Merge two operations that were always performed togetherOli Scherer-53/+49
2025-02-20Create safe helper for LLVMSetDLLStorageClassOli Scherer-4/+2
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-1/+1
2024-11-28Share inline(never) generics across cratesMark Rousskov-1/+4
This reduces code sizes and better respects programmer intent when marking inline(never). Previously such a marking was essentially ignored for generic functions, as we'd still inline them in remote crates.
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-7/+2
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-07Rollup merge of #130586 - dpaoliello:fixrawdylib, r=wesleywiserJubilee-9/+16
Set "symbol name" in raw-dylib import libraries to the decorated name `windows-rs` received a bug report that mixing raw-dylib generated and the Windows SDK import libraries was causing linker failures: <https://github.com/microsoft/windows-rs/issues/3285> The root cause turned out to be #124958, that is we are not including the decorated name in the import library and so the import name type is also not being correctly set. This change modifies the generation of import libraries to set the "symbol name" to the fully decorated name and correctly marks the import as being data vs function. Note that this also required some changes to how the symbol is named within Rust: for MSVC we now need to use the decorated name but for MinGW we still need to use partially decorated (or undecorated) name. Fixes #124958 Passing i686 MSVC and MinGW build: <https://github.com/rust-lang/rust/actions/runs/11000433888?pr=130586> r? `@ChrisDenton`
2024-10-26Use safe wrappers `get_visibility` and `set_visibility`Zalathar-1/+1
2024-10-26Use safe wrappers `get_linkage` and `set_linkage`Zalathar-2/+2
2024-10-26Effects cleanupDeadbeef-2/+1
- removed extra bits from predicates queries that are no longer needed in the new system - removed the need for `non_erasable_generics` to take in tcx and DefId, removed unused arguments in callers
2024-09-24Test fixing raw-dylibDaniel Paoliello-9/+16
2024-09-19Streamline `hidden` visibility setting.Nicholas Nethercote-49/+29
In `get_fn` there is a complicated set of if/elses to determine if `hidden` visibility should be applied. There are five calls to `LLVMRustSetVisibility` and some repetition in the comments. This commit streamlines it a bit: - Computes `hidden` and then uses it to determine if a single call to `LLVMRustSetVisibility` occurs. - Converts some of the if/elses into boolean expressions. - Removes the repetitive comments. Overall this makes it quite a bit shorter, and I find it easier to read.
2024-09-19Remove a low-value comment.Nicholas Nethercote-5/+0
We rarely use parameter comments, and these ones don't tell us anything interesting.
2024-08-16Add `warn(unreachable_pub)` to `rustc_codegen_llvm`.Nicholas Nethercote-1/+1
2024-08-07codegen: better centralize function attribute computationRalf Jung-3/+1
2024-07-30Move is_mingw_gnu_toolchain and i686_decorated_name to cg_ssabjorn3-2/+3
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-23Remove `#[macro_use] extern crate tracing` from `rustc_codegen_llvm`.Nicholas Nethercote-0/+1
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-14Fix some typoscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-10-13Format all the let chains in compilerMichael Goulet-4/+14
2023-09-14treat host effect params as erased generics in codegenDeadbeef-1/+2
This fixes the changes brought to codegen tests when effect params are added to libcore, by not attempting to monomorphize functions that get the host param by being `const fn`.
2023-07-29cg_llvm: remove pointee types and pointercast/bitcast-of-ptrErik Desjardins-35/+1
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-3/+3
2023-05-09CFI: Fix SIGILL reached via trait objectsRamon de C Valle-2/+2
Fix #106547 by transforming the concrete self into a reference to a trait object before emitting type metadata identifiers for trait methods.
2023-04-27rename `needs_infer` to `has_infer`Boxy-1/+1
2023-02-22Remove type-traversal trait aliasesAlan Egerton-1/+1
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-2/+2
2022-11-18Workaround for private global symbol issueDaniel Paoliello-1/+14
2022-10-19Get rid of native_library projection queriesnils-1/+2
They don't seem particularly useful as I don't expect native libraries to change frequently.
2022-09-01Always import all tracing macros for the entire crate instead of piecemeal ↵Oli Scherer-1/+0
by module
2022-08-26Implementation of import_name_typeDaniel Paoliello-3/+9
2022-07-06Update TypeVisitor pathsAlan Egerton-1/+1
2021-12-16Remove `in_band_lifetimes` from `rustc_codegen_llvm`LegionMammal978-1/+1
See #91867 for more information.
2021-10-06add platform support details file for armv7-unknown-linux-uclibcJonah Petri-2/+1
2021-10-06Add new target armv7-unknown-linux-uclibceabihfYannick Koehler-0/+1
Co-authored-by: Jonah Petri <jonah@petri.us>
2021-10-01Fix clippy lintsGuillaume Gomez-2/+2
2021-09-18Querify `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-1/+1
2021-09-18ty::layout: replicate `layout_of` setup for `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-3/+3
2021-05-28Fix static relocation model for PowerPC64Boris-Chengbiao Zhou-2/+1
We now also use `should_assume_dso_local()` for declarations and port two additional cases from clang: - Exclude PPC64 [1] - Exclude thread-local variables [2] [1]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1038-L1040 [2]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1048-L1050
2021-04-03Manually set dso_local when its valid to do soSimonas Kazlauskas-8/+11
This should have no real effect in most cases, as e.g. `hidden` visibility already implies `dso_local` (or at least LLVM IR does not preserve the `dso_local` setting if the item is already `hidden`), but it should fix `-Crelocation-model=static` and improve codegen in executables. Note that this PR does not exhaustively port the logic in [clang]. Only the obviously correct portion and what is necessary to fix a regression from LLVM 12 that relates to `-Crelocation_model=static`. Fixes #83335 [clang]: https://github.com/llvm/llvm-project/blob/3001d080c813da20b329303bf8f45451480e5905/clang/lib/CodeGen/CodeGenModule.cpp#L945-L1039
2020-11-08rustc_target: Rename some target options to avoid tautologyVadim Petrochenkov-1/+1
`target.target_endian` -> `target.endian` `target.target_c_int_width` -> `target.c_int_width` `target.target_os` -> `target.os` `target.target_env` -> `target.env` `target.target_vendor` -> `target.vendor` `target.target_family` -> `target.os_family` `target.target_mcount` -> `target.mcount`
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-1/+1
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-08-30mv compiler to compiler/mark-0/+192