summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-1/+1
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Re-sort #include lines for unittests. This uses a slightly modifiedChandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | clang-format (https://reviews.llvm.org/D33932) to keep primary headers at the top and handle new utility headers like 'gmock' consistently with other utility headers. No other change was made. I did no manual edits, all of this is clang-format. This should allow other changes to have more clear and focused diffs, and is especially motivated by moving some headers into more focused libraries. llvm-svn: 304786
* Revert r279016 -- it breaks win32-elf JIT tests.Lang Hames2016-08-181-2/+2
| | | | llvm-svn: 279029
* [RuntimeDyld] Strip leading '_' from symbols on 32-bit windows inLang Hames2016-08-181-2/+2
| | | | | | | | | | | RTDyldMemoryManager::getSymbolAddressInProcess() This should allow JIT'd code for win32 to find in-process symbols. See http://llvm.org/PR28699 . Patch by James Holderness. Thanks James! llvm-svn: 279016
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-15/+9
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* [RuntimeDyld] Fix '_' stripping in ↵Lang Hames2016-03-031-19/+7
| | | | | | | | | | | | | | | | | | | | | | | RTDyldMemoryManager::getSymbolAddressInProcess. The RTDyldMemoryManager::getSymbolAddressInProcess method accepts a linker-mangled symbol name, but it calls through to dlsym to do the lookup (via DynamicLibrary::SearchForAddressOfSymbol), and dlsym expects an unmangled symbol name. Historically we've attempted to "demangle" by removing leading '_'s on all platforms, and fallen back to an extra search if that failed. That's broken, as it can cause symbols to resolve incorrectly on platforms that don't do mangling if you query '_foo' and the process also happens to contain a 'foo'. Fix this by demangling conditionally based on the host platform. That's safe here because this function is specifically for symbols in the host process, so the usual cross-process JIT looking concerns don't apply. M unittests/ExecutionEngine/ExecutionEngineTest.cpp M lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp llvm-svn: 262657
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-1/+1
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* [ExecutionEngine] Fix MCJIT::addGlobalMapping.Lang Hames2015-03-311-0/+1
| | | | | | | | | | | | | | | | | | This patch fixes MCJIT::addGlobalMapping by changing the implementation of the ExecutionEngineState class. The new implementation maintains a bidirectional mapping between symbol names (std::strings) and addresses (uint64_ts), rather than a mapping between Value*s and void*s. This has fix has been made for backwards compatibility, however the strongly preferred way to resolve unknown symbols is by writing a custom RuntimeDyld::SymbolResolver (formerly RTDyldMemoryManager) and overriding the findSymbol method. The addGlobalMapping method is a hangover from the legacy JIT (which has was removed in 3.6), and may be deprecated in a future release as part of a clean-up of the ExecutionEngine interface. Patch by Murat Bolat. Thanks Murat! llvm-svn: 233747
* Add missing includes. make_unique proliferated everywhere.Benjamin Kramer2015-03-011-0/+1
| | | | llvm-svn: 230909
* [MCJIT] Turn the getSymbolAddress free function created in r218626 into a staticLang Hames2014-10-011-3/+6
| | | | | | | | | | | member of RTDyldMemoryManager (and rename to getSymbolAddressInProcess). The functionality this provides is very specific to RTDyldMemoryManager, so it makes sense to keep it in that class to avoid accidental re-use. No functional change. llvm-svn: 218741
* Unit test r218187, changing RTDyldMemoryManager::getSymbolAddress's behavior ↵David Blaikie2014-09-291-0/+30
| | | | | | | | | | | favor mangled lookup over unmangled lookup. The contract of this function seems problematic (fallback in either direction seems like it could produce bugs in one client or another), but here's some tests for its current behavior, at least. See the commit/review thread of r218187 for more discussion. llvm-svn: 218626
* Rework r218304, "ExecutionEngineTests: Call llvm_shutdown() on exit for ↵NAKAMURA Takumi2014-09-231-2/+3
| | | | | | | | ManagedStatic introduced in r218151." r218304 caused crash on msvc builder. llvm-svn: 218308
* ExecutionEngineTests: Call llvm_shutdown() on exit for ManagedStatic ↵NAKAMURA Takumi2014-09-231-0/+3
| | | | | | introduced in r218151. llvm-svn: 218304
* Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola2014-08-191-5/+6
| | | | llvm-svn: 215967
* [C++11] Use 'nullptr'.Craig Topper2014-06-081-11/+11
| | | | llvm-svn: 210442
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-2/+1
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort the #include lines for unittest/...Chandler Carruth2012-12-041-2/+2
| | | | llvm-svn: 169250
* unittests: add ErrorStr to ExecutionEngine testDylan Noblesmith2011-12-021-3/+5
| | | | | | Makes failures more self-explanatory. llvm-svn: 145704
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-1/+1
| | | | llvm-svn: 135375
* Make the ExecutionEngine automatically remove global mappings on when theirJeffrey Yasskin2009-10-131-0/+13
| | | | | | | GlobalValue is destroyed. Function destruction still leaks machine code and can crash on leaked stubs, but this is some progress. llvm-svn: 83987
* ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin2009-10-091-0/+20
| | | | | | | mappings, which could cause errors and assert-failures. This patch fixes that, adds a test, and refactors the global-mapping-removal code into a single place. llvm-svn: 83678
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-4/+8
| | | | llvm-svn: 78948
* Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's oldJeffrey Yasskin2009-08-041-0/+92
address from the reverse mapping, and add a test that this works now. llvm-svn: 78127
OpenPOWER on IntegriCloud