From 11023dc647fd8f41418da90d59db138400d0f334 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Mon, 27 May 2013 18:27:12 +0000 Subject: Import compiler-rt r182741. --- .../lit_tests/SharedLibs/load_shared_lib-so.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc (limited to 'lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc') diff --git a/lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc b/lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc new file mode 100644 index 000000000000..d05aa6a40d18 --- /dev/null +++ b/lib/tsan/lit_tests/SharedLibs/load_shared_lib-so.cc @@ -0,0 +1,22 @@ +//===----------- load_shared_lib-so.cc --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of ThreadSanitizer (TSan), a race detector. +// +//===----------------------------------------------------------------------===// + +#include + +int GLOB_SHARED = 0; + +extern "C" +void *write_from_so(void *unused) { + GLOB_SHARED++; + return NULL; +} -- cgit v1.2.3