[compiler-rt] r182918 - Fix #if guards in sanitizer_common code
Alexey Samsonov
samsonov at google.com
Thu May 30 02:16:04 PDT 2013
Author: samsonov
Date: Thu May 30 04:16:04 2013
New Revision: 182918
URL: http://llvm.org/viewvc/llvm-project?rev=182918&view=rev
Log:
Fix #if guards in sanitizer_common code
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=182918&r1=182917&r2=182918&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Thu May 30 04:16:04 2013
@@ -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;
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc?rev=182918&r1=182917&r2=182918&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc Thu May 30 04:16:04 2013
@@ -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();
More information about the llvm-commits
mailing list