summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan/tests/msan_loadable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/msan/tests/msan_loadable.cpp')
-rw-r--r--compiler-rt/lib/msan/tests/msan_loadable.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/compiler-rt/lib/msan/tests/msan_loadable.cpp b/compiler-rt/lib/msan/tests/msan_loadable.cpp
new file mode 100644
index 00000000000..7bc651512cc
--- /dev/null
+++ b/compiler-rt/lib/msan/tests/msan_loadable.cpp
@@ -0,0 +1,26 @@
+//===-- msan_loadable.cpp -------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of MemorySanitizer.
+//
+// MemorySanitizer unit tests.
+//===----------------------------------------------------------------------===//
+
+#include "msan/msan_interface_internal.h"
+#include <stdlib.h>
+
+static void *dso_global;
+
+// No name mangling.
+extern "C" {
+
+void **get_dso_global() {
+ return &dso_global;
+}
+
+}
OpenPOWER on IntegriCloud