summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-05-30 09:16:04 +0000
committerAlexey Samsonov <samsonov@google.com>2013-05-30 09:16:04 +0000
commit2a6cc672253ca76d622b53f9fd759123ce0d2080 (patch)
tree66f881ee354312e052f3489cbc0c365421440a6b /compiler-rt/lib/sanitizer_common
parent831a1d7cec45240ef93e19bfaac2c1cc1c788d85 (diff)
downloadbcm5719-llvm-2a6cc672253ca76d622b53f9fd759123ce0d2080.tar.gz
bcm5719-llvm-2a6cc672253ca76d622b53f9fd759123ce0d2080.zip
Fix #if guards in sanitizer_common code
llvm-svn: 182918
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc6
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
index 1d4aa00470f..cdc30ccba25 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc
@@ -193,7 +193,7 @@ uptr GetTlsSize() {
return g_tls_size;
}
-#if defined(__x86_64__) || defined(i386)
+#if defined(__x86_64__) || defined(__i386__)
// sizeof(struct thread) from glibc.
const uptr kThreadDescriptorSize = FIRST_32_SECOND_64(1216, 2304);
@@ -217,12 +217,12 @@ uptr ThreadSelf() {
#endif
return descr_addr;
}
-#endif // defined(__x86_64__) || defined(i386)
+#endif // defined(__x86_64__) || defined(__i386__)
void GetThreadStackAndTls(bool main, uptr *stk_addr, uptr *stk_size,
uptr *tls_addr, uptr *tls_size) {
#ifndef SANITIZER_GO
-#if defined(__x86_64__) || defined(i386)
+#if defined(__x86_64__) || defined(__i386__)
*tls_addr = ThreadSelf();
*tls_size = GetTlsSize();
*tls_addr -= *tls_size;
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc
index dc756164658..592d9c3eeaf 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc
@@ -195,7 +195,7 @@ TEST(SanitizerCommon, SetEnvTest) {
EXPECT_EQ(0, getenv(kEnvName));
}
-#if defined(__x86_64__) || defined(i386)
+#if defined(__x86_64__) || defined(__i386__)
void *thread_self_offset_test_func(void *arg) {
bool result =
*(uptr *)((char *)ThreadSelf() + ThreadSelfOffset()) == ThreadSelf();
OpenPOWER on IntegriCloud