File tree 1 file changed +9
-4
lines changed
llvm/include/llvm/Support
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 224
224
#define LLVM_PREFETCH (addr, rw, locality )
225
225
#endif
226
226
227
- #if __has_attribute(used) && __has_attribute(retain)
228
- #define LLVM_ATTRIBUTE_USED __attribute__ ((__used__, __retain__))
229
- #elif __has_attribute(used)
227
+ #if __has_attribute(used)
230
228
#define LLVM_ATTRIBUTE_USED __attribute__ ((__used__))
231
229
#else
232
230
#define LLVM_ATTRIBUTE_USED
233
231
#endif
234
232
233
+ #if __has_attribute(retain)
234
+ #define LLVM_ATTRIBUTE_RETAIN __attribute__ ((__retain__))
235
+ #else
236
+ #define LLVM_ATTRIBUTE_RETAIN
237
+ #endif
238
+
235
239
#if defined(__clang__)
236
240
#define LLVM_DEPRECATED (MSG, FIX ) __attribute__((deprecated(MSG, FIX)))
237
241
#else
@@ -621,7 +625,8 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
621
625
// / get stripped in release builds.
622
626
// FIXME: Move this to a private config.h as it's not usable in public headers.
623
627
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
624
- #define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED
628
+ #define LLVM_DUMP_METHOD \
629
+ LLVM_ATTRIBUTE_NOINLINE LLVM_ATTRIBUTE_USED LLVM_ATTRIBUTE_RETAIN
625
630
#else
626
631
#define LLVM_DUMP_METHOD LLVM_ATTRIBUTE_NOINLINE
627
632
#endif
You can’t perform that action at this time.
0 commit comments