Revert "Remove dependence on <ciso646>" (#126399)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / msvc / coverage-dll-stdio.cpp
blob5c597c9d12f21d5b367ccd6397bb6eddeef55545
1 // Test that coverage and MSVC CRT stdio work from a DLL. This ensures that the
2 // __local_stdio_printf_options function isn't instrumented for coverage.
4 // RUN: rm -rf %t && mkdir %t && cd %t
5 // RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/../dll_host.cpp -Fet.exe
6 // RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -Od %s -Fet.dll
7 // RUN: %run ./t.exe t.dll 2>&1 | FileCheck %s
9 #include <stdio.h>
11 extern "C" __declspec(dllexport)
12 int test_function() {
13 printf("hello world\n");
14 // CHECK: hello world
15 return 0;