Skip to content

Commit

Permalink
cut unnecessary function-exports in StaticMeta
Browse files Browse the repository at this point in the history
Summary: These uses of `FOLLY_EXPORT` are vestigial from when these member functions had their own local `thread_local`s. But now that is wrapped up in member function `getLocalCache`, so all other uses no longer need it.

Differential Revision: D58916971

fbshipit-source-id: 9e0a3db2485baee203675e75eeadb2eebe76a5f2
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jun 23, 2024
1 parent c48fdd2 commit 216baa6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions folly/detail/ThreadLocalDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ struct FOLLY_EXPORT StaticMeta final : StaticMetaBase {
return instance;
}

FOLLY_EXPORT FOLLY_ALWAYS_INLINE static ElementWrapper& get(EntryID* ent) {
FOLLY_ALWAYS_INLINE static ElementWrapper& get(EntryID* ent) {
// Eliminate as many branches and as much extra code as possible in the
// cached fast path, leaving only one branch here and one indirection
// below.
Expand All @@ -582,8 +582,7 @@ struct FOLLY_EXPORT StaticMeta final : StaticMetaBase {
* StaticMetaBase::allId2ThreadEntrySets_ updated with ThreadEntry* whenever a
* ThreadLocal is set/released.
*/
FOLLY_EXPORT FOLLY_ALWAYS_INLINE static ThreadEntry* getThreadEntry(
EntryID* ent) {
FOLLY_ALWAYS_INLINE static ThreadEntry* getThreadEntry(EntryID* ent) {
// Eliminate as many branches and as much extra code as possible in the
// cached fast path, leaving only one branch here and one indirection below.
uint32_t id = ent->getOrInvalid();
Expand Down

0 comments on commit 216baa6

Please sign in to comment.