summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can ↵NAKAMURA Takumi2012-02-241-0/+8
| | | | | | be mapped in FuncNames[] at the initialization. llvm-svn: 151313
* EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings ↵NAKAMURA Takumi2012-02-241-22/+0
| | | | | | | | | | | | 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">. llvm-svn: 151312
* Using the new external-linkage warning recently added instead of disabling ↵Aaron Ballman2012-02-141-1/+1
| | | | | | all return type warnings. llvm-svn: 150512
* Fixing warning due to the new "UTD return type in extern 'C'".Aaron Ballman2012-02-141-2/+9
| | | | | | Patch by Matt Johnson llvm-svn: 150508
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-3/+4
| | | | llvm-svn: 144648
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-17/+17
| | | | llvm-svn: 135375
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-181-2/+2
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | llvm-svn: 120298
* Convert some tab stops into spaces.Duncan Sands2010-07-121-1/+1
| | | | llvm-svn: 108130
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-5/+5
| | | | llvm-svn: 100709
* Typo noticed by Duncan.Torok Edwin2010-03-301-1/+1
| | | | llvm-svn: 99918
* Don't overwrite previous value, if it succeeded.Torok Edwin2010-03-301-1/+2
| | | | llvm-svn: 99886
* Honour addGlobalMapping() in the interpreter, if it was used to add mappings forTorok Edwin2010-03-301-0/+1
| | | | | | external Functions (the JIT does honour this). llvm-svn: 99885
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-281-3/+4
| | | | llvm-svn: 94746
* These should probably be errs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92673
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92618
* Fix passing of float arguments through ffi.Nick Lewycky2009-11-181-1/+1
| | | | llvm-svn: 89198
* Fail less mysteriously; inform the user that their LLVM was not built withNick Lewycky2009-11-171-0/+3
| | | | | | | libffi support and that the interpreter can't call external functions without it. Patch by Timo Juhani Lindfors! Fixes PR5466. llvm-svn: 89062
* Remove ByteswapSCANFResults, it is dead.Daniel Dunbar2009-11-081-76/+0
| | | | llvm-svn: 86458
* We don't need to byteswap, the interpreter assumes the program is runningNick Lewycky2009-11-081-8/+1
| | | | | | native anyways. This fixes a crash using %d and similar in a scanf statement. llvm-svn: 86440
* Stop using alloca.Nick Lewycky2009-09-181-17/+14
| | | | llvm-svn: 82225
* Some platforms may need malloc.h for alloca.Daniel Dunbar2009-09-171-3/+6
| | | | llvm-svn: 82100
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-4/+4
| | | | llvm-svn: 79842
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-9/+12
| | | | llvm-svn: 78948
* This void is implicit in C++.Dan Gohman2009-08-121-1/+1
| | | | llvm-svn: 78848
* MSVC warning fixes; patch by Stein Roger!Daniel Dunbar2009-08-071-0/+11
| | | | llvm-svn: 78405
* Switch to getNameStr().Daniel Dunbar2009-07-241-3/+3
| | | | llvm-svn: 76962
* Simplify some uses of Value::getName()Daniel Dunbar2009-07-221-2/+2
| | | | llvm-svn: 76786
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-11/+13
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-2/+2
| | | | llvm-svn: 74931
* Add locking around the external function lookup table for the interpreter.Owen Anderson2009-06-221-1/+12
| | | | llvm-svn: 73912
* Link against libffi if available, fall back to "no external calls fromNick Lewycky2009-04-131-8/+8
| | | | | | interpreter mode" when it's not. llvm-svn: 68937
* Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn'tNick Lewycky2009-02-041-496/+212
| | | | | | | | | | | | there. This changes the interpreter to use libffi. After this patch, the interpreter will barely be able to call any external functions if built on a system without libffi installed (just enough to pass 'make check' really). But with libffi, we can now call any function that isn't variadic or taking a struct or vector parameter (but pointer to struct is fine). Patch by Alexei Svitkine! llvm-svn: 63723
* Revert r62553 and r62616 due to issues with portability.Tanya Lattner2009-01-221-206/+496
| | | | llvm-svn: 62777
* Fix typo. Patch by Alexei Svitkine.Duncan Sands2009-01-201-1/+1
| | | | llvm-svn: 62616
* Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!Nick Lewycky2009-01-201-496/+206
| | | | | | | | | | | This requires a rebuild of 'configure' itself. I will be committing that next, but built with the wrong version of autoconf. Somebody who has the right one, please update it. As a side-note, because of the way autoconf works, all built tools will link against libffi, not just lli. If you know how to fix this, please let me know ... llvm-svn: 62553
* Add <cstdio> include where needed by gcc-4.4.Duncan Sands2008-10-081-0/+1
| | | | | | Patch by Samuel Tardieu. llvm-svn: 57291
* Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-stringDan Gohman2008-08-051-1/+1
| | | | | | | warning. There wasn't actually a problem here, because the contents of the string are known. llvm-svn: 54385
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-0/+1
| | | | | | annoying warnings. llvm-svn: 47367
* Added memmove to interpreter external functions list. Patch by Daniel Dunbar.Evan Cheng2008-02-201-0/+9
| | | | llvm-svn: 47363
* Use empty() instead of comparing size() with zero.Dan Gohman2008-01-291-3/+3
| | | | llvm-svn: 46514
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Add explicit keywords, and fix a minor typo that they uncovered.Dan Gohman2007-12-141-1/+1
| | | | llvm-svn: 45034
* Add a guard to cxxabi header as other platform mayZhou Sheng2007-12-121-0/+12
| | | | | | not support it. llvm-svn: 44914
* Fixed PR1629.Zhou Sheng2007-12-121-0/+40
| | | | | | | Make lli interpreter correctly call external functions sin()/cos(), __cxa_guard_acquire() and __cxa_guard_release(). llvm-svn: 44910
* It looks like this has been broken for some time -Duncan Sands2007-12-101-2/+2
| | | | | | get it to compile. llvm-svn: 44791
* Add a comment: don't expect from external function resolver in interpreterAnton Korobeynikov2007-07-301-0/+5
| | | | | | things, it wasn't designed to handle. llvm-svn: 40608
* VStudio compiler errors and placing Function*->ExFunc map under ↵Chuck Rose III2007-07-271-4/+5
| | | | | | | | | | | | | ManagedStatic control. This commit fixes two things. One is a pair of VStudio compiler errors stemming from variables which defined within the for loop statement and also within the body of the for loop. I fixed these by renaming one of the two variables. Additionally, I've made the Function*->ExFunc map in ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown. In repeated uses of the interpreter, where the same Function* address may get used for completely differnet functions, this was causing a crash. llvm-svn: 40558
OpenPOWER on IntegriCloud