summaryrefslogtreecommitdiff
path: root/test/CodeGen/asan-globals-gc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/asan-globals-gc.cpp')
-rw-r--r--test/CodeGen/asan-globals-gc.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/asan-globals-gc.cpp b/test/CodeGen/asan-globals-gc.cpp
new file mode 100644
index 0000000000000..6d64f41dda8dd
--- /dev/null
+++ b/test/CodeGen/asan-globals-gc.cpp
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - -triple x86_64-windows-msvc %s | FileCheck %s --check-prefix=WITH-GC
+// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - -triple x86_64-windows-msvc -fdata-sections %s | FileCheck %s --check-prefix=WITH-GC
+
+int global;
+
+// WITH-GC-NOT: call void @__asan_register_globals
+// WITHOUT-GC: call void @__asan_register_globals