summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2017-06-12 07:22:15 +0000
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2017-06-12 07:22:15 +0000
commit2cd536c7055dab5aaaf2f96016705c11ae5e6eec (patch)
tree37840d757d314f108b8949148e168b697b9af560 /llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx
parent69fead95c725b7e884ab852146ae34d0747c2477 (diff)
downloadbcm5719-llvm-2cd536c7055dab5aaaf2f96016705c11ae5e6eec.tar.gz
bcm5719-llvm-2cd536c7055dab5aaaf2f96016705c11ae5e6eec.zip
Export the required symbol from DynamicLibraryTests
Running unittests/Support/DynamicLibrary/DynamicLibraryTests fails when LLVM is configured with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=ON, because the test's version script only contains symbols extracted from the static libraries, that the test links with, but not those from the main object/executable itself. The patch moves the one symbol, needed by the test, to a static library. Fixes https://bugs.llvm.org/show_bug.cgi?id=32893 Patch by Momchil Velikov. Differential Revision: https://reviews.llvm.org/D33789 llvm-svn: 305181
Diffstat (limited to 'llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx')
-rw-r--r--llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx b/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx
new file mode 100644
index 00000000000..97f190b0b9b
--- /dev/null
+++ b/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx
@@ -0,0 +1,16 @@
+//===- llvm/unittest/Support/DynamicLibrary/DynamicLibraryLib.cpp ---------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "PipSqueak.h"
+
+#ifndef PIPSQUEAK_TESTA_RETURN
+#define PIPSQUEAK_TESTA_RETURN "ProcessCall"
+#endif
+
+extern "C" PIPSQUEAK_EXPORT const char *TestA() { return PIPSQUEAK_TESTA_RETURN; }
OpenPOWER on IntegriCloud