[llvm-commits] [compiler-rt] r167883 - /compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Kostya Serebryany kcc at google.com
Tue Nov 13 15:13:17 PST 2012


Author: kcc
Date: Tue Nov 13 17:13:17 2012
New Revision: 167883

URL: http://llvm.org/viewvc/llvm-project?rev=167883&view=rev
Log:
[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=167883&r1=167882&r2=167883&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue Nov 13 17:13:17 2012
@@ -36,7 +36,7 @@
 // --------------- sanitizer_libc.h
 void *internal_mmap(void *addr, uptr length, int prot, int flags,
                     int fd, u64 offset) {
-#if __WORDSIZE == 64
+#if defined __x86_64__
   return (void *)syscall(__NR_mmap, addr, length, prot, flags, fd, offset);
 #else
   return (void *)syscall(__NR_mmap2, addr, length, prot, flags, fd, offset);
@@ -69,7 +69,7 @@
 }
 
 uptr internal_filesize(fd_t fd) {
-#if __WORDSIZE == 64
+#if defined __x86_64__
   struct stat st;
   if (syscall(__NR_fstat, fd, &st))
     return -1;
@@ -95,7 +95,7 @@
 
 // ----------------- sanitizer_common.h
 bool FileExists(const char *filename) {
-#if __WORDSIZE == 64
+#if defined __x86_64__
   struct stat st;
   if (syscall(__NR_stat, filename, &st))
     return false;





More information about the llvm-commits mailing list