1*65abcf6cSAlvin Wong // Test that coverage and MSVC CRT stdio work from a DLL. This ensures that the 2*65abcf6cSAlvin Wong // __local_stdio_printf_options function isn't instrumented for coverage. 3*65abcf6cSAlvin Wong 4*65abcf6cSAlvin Wong // RUN: rm -rf %t && mkdir %t && cd %t 5*65abcf6cSAlvin Wong // RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/../dll_host.cpp -Fet.exe 6*65abcf6cSAlvin Wong // RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -Od %s -Fet.dll 7*65abcf6cSAlvin Wong // RUN: %run ./t.exe t.dll 2>&1 | FileCheck %s 8*65abcf6cSAlvin Wong 9*65abcf6cSAlvin Wong #include <stdio.h> 10*65abcf6cSAlvin Wong 11*65abcf6cSAlvin Wong extern "C" __declspec(dllexport) test_function()12*65abcf6cSAlvin Wongint test_function() { 13*65abcf6cSAlvin Wong printf("hello world\n"); 14*65abcf6cSAlvin Wong // CHECK: hello world 15*65abcf6cSAlvin Wong return 0; 16*65abcf6cSAlvin Wong } 17