aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-07 20:50:09 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-07 20:50:09 +0000
commit482cccd37e71ad69845d954b548bd46c2ee15155 (patch)
treed263558d3b0470247bc9163f6e9f6b68ecf77563 /lib/ExecutionEngine/Interpreter
parent2724915c171b08fa9f7f9e54a46ea81708d9c5b2 (diff)
downloadexternal_llvm-482cccd37e71ad69845d954b548bd46c2ee15155.zip
external_llvm-482cccd37e71ad69845d954b548bd46c2ee15155.tar.gz
external_llvm-482cccd37e71ad69845d954b548bd46c2ee15155.tar.bz2
MSVC warning fixes; patch by Stein Roger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 7994870..68097fd 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -291,6 +291,12 @@ GenericValue Interpreter::callExternalFunction(Function *F,
//===----------------------------------------------------------------------===//
// Functions "exported" to the running application...
//
+
+// Visual Studio warns about returning GenericValue in extern "C" linkage
+#ifdef _MSC_VER
+ #pragma warning(disable : 4190)
+#endif
+
extern "C" { // Don't add C++ manglings to llvm mangling :)
// void atexit(Function*)
@@ -539,6 +545,11 @@ GenericValue lle_X_fprintf(const FunctionType *FT,
} // End extern "C"
+// Done with externals; turn the warning back on
+#ifdef _MSC_VER
+ #pragma warning(default: 4190)
+#endif
+
void Interpreter::initializeExternalFunctions() {
sys::ScopedLock Writer(*FunctionsLock);