diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2012-02-14 21:29:32 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2012-02-14 21:29:32 +0000 |
commit | b960a510797a21d6198b65d5612127f41006dfee (patch) | |
tree | 64ae3b0729f588b6c04ab95b52d5799bb9b9df0f /llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | |
parent | 06df7725fc2334c3662664f89993b07190505b89 (diff) | |
download | bcm5719-llvm-b960a510797a21d6198b65d5612127f41006dfee.tar.gz bcm5719-llvm-b960a510797a21d6198b65d5612127f41006dfee.zip |
Fixing warning due to the new "UTD return type in extern 'C'".
Patch by Matt Johnson
llvm-svn: 150508
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 40e12cc98f7..c5ed6d16b22 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -297,10 +297,14 @@ GenericValue Interpreter::callExternalFunction(Function *F, // Functions "exported" to the running application... // -// Visual Studio warns about returning GenericValue in extern "C" linkage +// 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" +#endif extern "C" { // Don't add C++ manglings to llvm mangling :) @@ -471,7 +475,10 @@ GenericValue lle_X_fprintf(FunctionType *FT, } // End extern "C" -// Done with externals; turn the warning back on +// 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 |