1 // RUN: %clang_cl_asan %Od %p/dll_host.cpp %Fe%t
3 // RUN: %clang_cl_nocxx_asan %Gw %LD %Od %s %Fe%t.dll
4 // RUN: %env_asan_opts=report_globals=2 %run %t %t.dll 2>&1 | FileCheck %s --check-prefix=NOSTRIP
5 // RUN: %clang_cl_nocxx_asan %Gw %LD -O2 %s %Fe%t.dll \
6 // RUN: %if target={{.*-windows-gnu}} %{ -Wl,--gc-sections %} \
7 // RUN: %else %{ -link -opt:ref %}
8 // RUN: %env_asan_opts=report_globals=2 %run %t %t.dll 2>&1 | FileCheck %s --check-prefix=STRIP
21 // Check that our global registration scheme works with MSVC's linker dead
22 // stripping (/OPT:REF).
24 // NOSTRIP: Added Global{{.*}}name=dead_global
25 // NOSTRIP: Added Global{{.*}}name=live_global
28 // STRIP-NOT: Added Global{{.*}}name=dead_global
29 // STRIP: Added Global{{.*}}name=live_global