forked from OSchip/llvm-project
Fixing warning due to the new "UTD return type in extern 'C'".
Patch by Matt Johnson llvm-svn: 150508
This commit is contained in:
parent
06df7725fc
commit
b960a51079
|
@ -297,10 +297,14 @@ GenericValue Interpreter::callExternalFunction(Function *F,
|
||||||
// Functions "exported" to the running application...
|
// 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
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4190)
|
#pragma warning(disable : 4190)
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wreturn-type"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C" { // Don't add C++ manglings to llvm mangling :)
|
extern "C" { // Don't add C++ manglings to llvm mangling :)
|
||||||
|
|
||||||
|
@ -471,7 +475,10 @@ GenericValue lle_X_fprintf(FunctionType *FT,
|
||||||
|
|
||||||
} // End extern "C"
|
} // 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
|
#ifdef _MSC_VER
|
||||||
#pragma warning(default: 4190)
|
#pragma warning(default: 4190)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue