Skip to content

Commit c3241d0

Browse files
committed
cold was necessary on try_initialize_nodrop to get more straight line asm
1 parent 1a7f774 commit c3241d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libstd/thread/local.rs

+1
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ pub mod fast {
432432
// performed for every call to `Key::get`.
433433
// LLVM issue: https://bugs.llvm.org/show_bug.cgi?id=41722
434434
#[inline(never)]
435+
#[cold]
435436
unsafe fn try_initialize_drop<F: FnOnce() -> T>(&self, init: F) -> Option<&'static T> {
436437
// We don't put a `needs_drop` check around this and call it a day
437438
// because this function is not inlined. Unwrapping code gets

0 commit comments

Comments
 (0)