summaryrefslogtreecommitdiff
path: root/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp')
-rw-r--r--compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
new file mode 100644
index 000000000000..788488dbb8ed
--- /dev/null
+++ b/compiler-rt/test/asan/TestCases/Windows/msvc/dll_large_function.cpp
@@ -0,0 +1,13 @@
+// Make sure we can link a DLL with large functions which would mean
+// functions such as __asan_loadN and __asan_storeN will be called
+// from the DLL. We simulate the large function with
+// -mllvm -asan-instrumentation-with-call-threshold=0.
+// RUN: %clang_cl_asan %s -c -Fo%t.obj -mllvm -asan-instrumentation-with-call-threshold=0
+// RUN: lld-link /nologo /DLL /OUT:%t.dll %t.obj %asan_dll_thunk
+// REQUIRES: asan-static-runtime
+// REQUIRES: lld-available
+
+void f(long* foo, long* bar) {
+ // One load and one store
+ *foo = *bar;
+}