[ASan] Add extern C for __asan_symbolize on Windows
authorAlexey Samsonov <samsonov@google.com>
Tue, 2 Oct 2012 12:35:42 +0000 (12:35 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 2 Oct 2012 12:35:42 +0000 (12:35 +0000)
llvm-svn: 165003

compiler-rt/lib/asan/asan_win.cc

index 8bee62e..f04c73c 100644 (file)
@@ -144,6 +144,8 @@ void AsanPlatformThreadInit() {
 // ---------------------- Interface ---------------- {{{1
 using namespace __asan;  // NOLINT
 
+extern "C" {
+SANITIZER_INTERFACE_ATTRIBUTE NOINLINE
 bool __asan_symbolize(const void *addr, char *out_buffer, int buffer_size) {
   ScopedLock lock(&dbghelp_lock);
   if (!dbghelp_initialized) {
@@ -184,7 +186,7 @@ bool __asan_symbolize(const void *addr, char *out_buffer, int buffer_size) {
   }
   return true;
 }
-
+}  // extern "C"
 
 
 #endif  // _WIN32