about summary refs log tree commit diff
path: root/src/libstd/thread
diff options
context:
space:
mode:
authortyler <tyler@brainiumstudios.com>2019-05-11 10:14:40 -0700
committertyler <tyler@brainiumstudios.com>2019-05-15 07:30:34 -0700
commitc3241d0ba03ff1e90ffdb4cd434660f81194b438 (patch)
tree42a04342c948ffef5d9f821e9645c48998fcebda /src/libstd/thread
parent1a7f774914d8d3c2a16e40332ad43270c461ec71 (diff)
downloadrust-c3241d0ba03ff1e90ffdb4cd434660f81194b438.tar.gz
rust-c3241d0ba03ff1e90ffdb4cd434660f81194b438.zip
cold was necessary on try_initialize_nodrop to get more straight line asm
Diffstat (limited to 'src/libstd/thread')
-rw-r--r--src/libstd/thread/local.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index e6f096a8da5..998d9dcc683 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -432,6 +432,7 @@ pub mod fast {
         // performed for every call to `Key::get`.
         // LLVM issue: https://bugs.llvm.org/show_bug.cgi?id=41722
         #[inline(never)]
+        #[cold]
         unsafe fn try_initialize_drop<F: FnOnce() -> T>(&self, init: F) -> Option<&'static T> {
             // We don't put a `needs_drop` check around this and call it a day
             // because this function is not inlined. Unwrapping code gets