brintos

brintos / llvm-project-archived public Read only

0
0
Text · 560 B · 5c597c9 Raw
17 lines · cpp
1// Test that coverage and MSVC CRT stdio work from a DLL. This ensures that the2// __local_stdio_printf_options function isn't instrumented for coverage.3 4// RUN: rm -rf %t && mkdir %t && cd %t5// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -Od %p/../dll_host.cpp -Fet.exe6// RUN: %clang_cl_asan -fsanitize-coverage=func,trace-pc-guard -LD -Od %s -Fet.dll7// RUN: %run ./t.exe t.dll 2>&1 | FileCheck %s8 9#include <stdio.h>10 11extern "C" __declspec(dllexport)12int test_function() {13  printf("hello world\n");14  // CHECK: hello world15  return 0;16}17