Skip to content

Commit

Permalink
FOLLY_ATTR_GNU_USED
Browse files Browse the repository at this point in the history
Summary:
```
[[FOLLY_ATTR_GNU_USED]] void foo() {}
```

Differential Revision: D57165728

fbshipit-source-id: 5c492c7ccc890ebdb56db8c2cc5acbdd0fad8c71
  • Loading branch information
yfeldblum authored and facebook-github-bot committed May 9, 2024
1 parent f455273 commit 8fb67f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions folly/CppAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,9 @@
#else
#define FOLLY_ATTR_CLANG_PRESERVE_ALL
#endif

#if FOLLY_HAS_CPP_ATTRIBUTE(gnu::used)
#define FOLLY_ATTR_GNU_USED gnu::used
#else
#define FOLLY_ATTR_GNU_USED
#endif

0 comments on commit 8fb67f8

Please sign in to comment.