summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-02-24 00:19:58 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-02-24 00:19:58 +0000
commit423cbc51440e9b7381ae7372c33fd76562c35e5f (patch)
treeb5c4a372c447c24162ba51f1d17948ad5b28d0ca /lib/ExecutionEngine/Interpreter
parentdb9538923eb95df48e9a6abe7e3b0ba8435915d7 (diff)
downloadllvm-423cbc51440e9b7381ae7372c33fd76562c35e5f.tar.gz
llvm-423cbc51440e9b7381ae7372c33fd76562c35e5f.tar.bz2
llvm-423cbc51440e9b7381ae7372c33fd76562c35e5f.tar.xz
EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings with -Wreturn-type (and MSC's w4190).
In historical reason, Interpreter's external entries had prefix "lle_X_" as C linkage, even for well-known entries in EE/Interpreter. Now, at least on ToT, they are resolved via FuncNames[] mapper. We will not need their symbols are expected to be exported any more. Clang r150128 has introduced the warning <"%0 has C-linkage specified, but returns user-defined type %1 which is incompatible with C">. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter')
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index f4dc183f00..9eaf8486bf 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -297,17 +297,6 @@ GenericValue Interpreter::callExternalFunction(Function *F,
// Functions "exported" to the running application...
//
-// Visual Studio and Clang warn about returning GenericValue in extern "C" linkage
-#ifdef _MSC_VER
- #pragma warning(disable : 4190)
-#endif
-#ifdef __clang__
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
-#endif
-
-extern "C" { // Don't add C++ manglings to llvm mangling :)
-
// void atexit(Function*)
GenericValue lle_X_atexit(FunctionType *FT,
const std::vector<GenericValue> &Args) {
@@ -473,17 +462,6 @@ GenericValue lle_X_fprintf(FunctionType *FT,
return GV;
}
-} // End extern "C"
-
-// Done with externals; turn the warning back on for Clang and Visual Studio
-#ifdef __clang__
- #pragma clang diagnostic pop
-#endif
-#ifdef _MSC_VER
- #pragma warning(default: 4190)
-#endif
-
-
void Interpreter::initializeExternalFunctions() {
sys::ScopedLock Writer(*FunctionsLock);
FuncNames["lle_X_atexit"] = lle_X_atexit;