File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 2323#define COMPILER_RT_FTRUNCATE (f ,l ) _chsize(_fileno(f),l)
2424#define COMPILER_RT_ALWAYS_INLINE __forceinline
2525#define COMPILER_RT_CLEANUP (x )
26+ #define COMPILER_RT_UNUSED
2627#define COMPILER_RT_USED
2728#elif __GNUC__
2829#ifdef _WIN32
3839#define COMPILER_RT_ALLOCA __builtin_alloca
3940#define COMPILER_RT_ALWAYS_INLINE inline __attribute((always_inline))
4041#define COMPILER_RT_CLEANUP (x ) __attribute__((cleanup(x)))
42+ #define COMPILER_RT_UNUSED __attribute__((unused))
4143#define COMPILER_RT_USED __attribute__((used))
4244#endif
4345
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ COMPILER_RT_VISIBILITY FILE *lprofOpenFileEx(const char *ProfileName) {
269269
270270// Return 1 (true) if the file descriptor Fd represents a file that is on a
271271// local filesystem, otherwise return 0.
272- static int is_local_filesystem (int Fd ) {
272+ COMPILER_RT_UNUSED static int is_local_filesystem (int Fd ) {
273273#if defined(_AIX )
274274 struct statfs Vfs ;
275275 if (fstatfs (Fd , & Vfs ) != 0 ) {
@@ -317,7 +317,6 @@ static int is_local_filesystem(int Fd) {
317317static int isMmapSafe (int Fd ) {
318318 if (getenv ("LLVM_NO_MMAP" )) // For testing purposes.
319319 return 0 ;
320- (void )& is_local_filesystem ; // a fake reference to satisfy -Wunused-function
321320#ifdef _AIX
322321 return is_local_filesystem (Fd );
323322#else
You can’t perform that action at this time.
0 commit comments