[ASan] Declare CreateThread as extern "C" to fix the Windows build.
authorAlexander Potapenko <glider@google.com>
Thu, 21 Feb 2013 15:32:50 +0000 (15:32 +0000)
committerAlexander Potapenko <glider@google.com>
Thu, 21 Feb 2013 15:32:50 +0000 (15:32 +0000)
llvm-svn: 175760

compiler-rt/lib/asan/asan_intercepted_functions.h

index ce2133f..7cfbede 100644 (file)
@@ -81,10 +81,10 @@ using __sanitizer::uptr;
 
 // Windows threads.
 # if defined(_WIN32)
+extern "C" {
 __declspec(dllimport)
 void* __stdcall CreateThread(void *sec, uptr st, void* start,
                              void *arg, DWORD fl, DWORD *id);
-extern "C" {
 
 int memcmp(const void *a1, const void *a2, uptr size);
 void memmove(void *to, const void *from, uptr size);