xref: /llvm-project/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp (revision 53a81d4d26f0409de8a0655d7af90f2bea222a12)
165abcf6cSAlvin Wong // Make sure we can link a DLL with large functions which would mean
265abcf6cSAlvin Wong // functions such as __asan_loadN and __asan_storeN will be called
365abcf6cSAlvin Wong // from the DLL.  We simulate the large function with
465abcf6cSAlvin Wong // -mllvm -asan-instrumentation-with-call-threshold=0.
565abcf6cSAlvin Wong // RUN: %clang_cl_asan %s -c -Fo%t.obj -mllvm -asan-instrumentation-with-call-threshold=0
6*53a81d4dSCharlie Barto // RUN: lld-link /nologo /DLL /OUT:%t.dll %t.obj  %asan_lib %asan_thunk
765abcf6cSAlvin Wong // REQUIRES: lld-available
865abcf6cSAlvin Wong 
965abcf6cSAlvin Wong void f(long* foo, long* bar) {
1065abcf6cSAlvin Wong   // One load and one store
1165abcf6cSAlvin Wong   *foo = *bar;
1265abcf6cSAlvin Wong }
13