diff options
| author | Kostya Serebryany <kcc@google.com> | 2012-11-13 23:13:17 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2012-11-13 23:13:17 +0000 |
| commit | 1f8922cf7115da5cdaef7333f4ad51475c13e406 (patch) | |
| tree | 8f82fc52bd3160cbd5e401b7a464fb6d6444d244 /compiler-rt/lib | |
| parent | 3ac21f10f08f1aff156c7f7c00a3c8bf905c5466 (diff) | |
| download | bcm5719-llvm-1f8922cf7115da5cdaef7333f4ad51475c13e406.tar.gz bcm5719-llvm-1f8922cf7115da5cdaef7333f4ad51475c13e406.zip | |
[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc
llvm-svn: 167883
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_linux.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 64677f9c21b..51ad4ceeef3 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -36,7 +36,7 @@ namespace __sanitizer { // --------------- 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_write(fd_t fd, const void *buf, uptr count) { } 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 @@ int internal_sched_yield() { // ----------------- 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; |

