[compiler-rt] r203601 - Revert "[asan] Make __cxa_demangle non-weak symbol on Android."
Hans Wennborg
hans at hanshq.net
Tue Mar 11 13:24:00 PDT 2014
Author: hans
Date: Tue Mar 11 15:23:59 2014
New Revision: 203601
URL: http://llvm.org/viewvc/llvm-project?rev=203601&view=rev
Log:
Revert "[asan] Make __cxa_demangle non-weak symbol on Android."
stlport doesn't include __cxa_demangle.
This reverts r201545.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc?rev=203601&r1=203600&r2=203601&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc Tue Mar 11 15:23:59 2014
@@ -32,18 +32,10 @@
// C++ demangling function, as required by Itanium C++ ABI. This is weak,
// because we do not require a C++ ABI library to be linked to a program
// using sanitizers; if it's not present, we'll just use the mangled name.
-//
-// On Android, this is not weak, because we are using shared runtime library
-// AND static libstdc++, and there is no good way to conditionally export
-// __cxa_demangle. By making this a non-weak symbol, we statically link
-// __cxa_demangle into ASan runtime library.
namespace __cxxabiv1 {
- extern "C"
-#if !SANITIZER_ANDROID
- SANITIZER_WEAK_ATTRIBUTE
-#endif
- char *__cxa_demangle(const char *mangled, char *buffer, size_t *length,
- int *status);
+ extern "C" SANITIZER_WEAK_ATTRIBUTE
+ char *__cxa_demangle(const char *mangled, char *buffer,
+ size_t *length, int *status);
}
namespace __sanitizer {
@@ -55,7 +47,7 @@ static const char *DemangleCXXABI(const
// own demangler (libc++abi's implementation could be adapted so that
// it does not allocate). For now, we just call it anyway, and we leak
// the returned value.
- if (SANITIZER_ANDROID || &__cxxabiv1::__cxa_demangle)
+ if (__cxxabiv1::__cxa_demangle)
if (const char *demangled_name =
__cxxabiv1::__cxa_demangle(name, 0, 0, 0))
return demangled_name;
More information about the llvm-commits
mailing list