about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2021-04-04 11:55:13 -0700
committerJosh Triplett <josh@joshtriplett.org>2021-04-04 11:55:13 -0700
commit37498a19dedb4105f8800a7cc2473803fd4bbccf (patch)
tree6b446dc0199898e54ef51ca4b1238996e44a553f /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent5b0ab79116ba3231f447bc7a67c16ce93ecca0a3 (diff)
downloadrust-37498a19dedb4105f8800a7cc2473803fd4bbccf.tar.gz
rust-37498a19dedb4105f8800a7cc2473803fd4bbccf.zip
Use `#[inline(always)]` on trivial UnsafeCell methods
UnsafeCell is the standard building block for shared mutable data
structures. UnsafeCell should add zero overhead compared to using raw
pointers directly.

Some reports suggest that debug builds, or even builds at opt-level 1,
may not always be inlining its methods. Mark the methods as
`#[inline(always)]`, since once inlined the methods should result in no
actual code other than field accesses.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions