xref: /llvm-project/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp (revision 53a81d4d26f0409de8a0655d7af90f2bea222a12)
1 // Make sure we can link a DLL with large functions which would mean
2 // functions such as __asan_loadN and __asan_storeN will be called
3 // from the DLL.  We simulate the large function with
4 // -mllvm -asan-instrumentation-with-call-threshold=0.
5 // RUN: %clang_cl_asan %s -c -Fo%t.obj -mllvm -asan-instrumentation-with-call-threshold=0
6 // RUN: lld-link /nologo /DLL /OUT:%t.dll %t.obj  %asan_lib %asan_thunk
7 // REQUIRES: lld-available
8 
9 void f(long* foo, long* bar) {
10   // One load and one store
11   *foo = *bar;
12 }
13