diff options
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 11 | ||||
-rw-r--r-- | tools/bugpoint/bugpoint.cpp | 2 |
2 files changed, 12 insertions, 1 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); diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index 573a406..d00036a 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -129,7 +129,7 @@ int main(int argc, char **argv) { errs() << "Tool execution error: " << TEE.what() << '\n'; } catch (const std::string& msg) { errs() << argv[0] << ": " << msg << "\n"; - } catch (const std::bad_alloc &e) { + } catch (const std::bad_alloc&) { errs() << "Oh no, a bugpoint process ran out of memory!\n" "To increase the allocation limits for bugpoint child\n" "processes, use the -mlimit option.\n"; |