[compiler-rt] r255160 - asan_win_dynamic_runtime_thunk.cc: declare atexit

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 13:43:03 PST 2015


Author: hans
Date: Wed Dec  9 15:43:03 2015
New Revision: 255160

URL: http://llvm.org/viewvc/llvm-project?rev=255160&view=rev
Log:
asan_win_dynamic_runtime_thunk.cc: declare atexit

MSVC apparently makes atexit available even without including stdlib.h,
but clang-cl does not. This makes the file build also with clang-cl.

Modified:
    compiler-rt/trunk/lib/asan/asan_win_dynamic_runtime_thunk.cc

Modified: compiler-rt/trunk/lib/asan/asan_win_dynamic_runtime_thunk.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win_dynamic_runtime_thunk.cc?rev=255160&r1=255159&r2=255160&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win_dynamic_runtime_thunk.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win_dynamic_runtime_thunk.cc Wed Dec  9 15:43:03 2015
@@ -59,6 +59,7 @@ int __asan_option_detect_stack_use_after
 // using atexit() that calls a small subset of C terminators
 // where LLVM global_dtors is placed.  Fingers crossed, no other C terminators
 // are there.
+extern "C" int __cdecl atexit(void (__cdecl *f)(void));
 extern "C" void __cdecl _initterm(void *a, void *b);
 
 namespace {




More information about the llvm-commits mailing list