[llvm-commits] [llvm] r151312 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Thu Feb 23 16:19:58 PST 2012
Author: chapuni
Date: Thu Feb 23 18:19:58 2012
New Revision: 151312
URL: http://llvm.org/viewvc/llvm-project?rev=151312&view=rev
Log:
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">.
Modified:
llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=151312&r1=151311&r2=151312&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Thu Feb 23 18:19:58 2012
@@ -297,17 +297,6 @@
// 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 @@
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;
More information about the llvm-commits
mailing list