summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Clang-tidy modernize-use-nullptr and modernize-use-override warnings; ↵Eugene Zelenko2016-01-261-6/+2
| | | | | | | | other minor fixes. Differential revision: reviews.llvm.org/D16568 llvm-svn: 258831
* [Orc] Refactor ObjectLinkingLayer::addObjectSet to defer loading objects untilLang Hames2016-01-191-0/+72
| | | | | | | | | | | | | | | | they're needed. Prior to this patch objects were loaded (via RuntimeDyld::loadObject) when they were added to the ObjectLinkingLayer, but were not relocated and finalized until a symbol address was requested. In the interim, another object could be loaded and finalized with the same memory manager, causing relocation/finalization of the first object to fail (as the first finalization call may have marked the allocated memory for the first object read-only). By deferring the loadObject call (and subsequent memory allocations) until an object file is needed we can avoid prematurely finalizing memory. llvm-svn: 258185
* [Orc] Expand a comment explaining a unit test.Lang Hames2016-01-181-0/+5
| | | | llvm-svn: 258032
* OrcJITTests//ObjectLinkingLayerTest.cpp: Appease msc18's C2327. It seems ↵NAKAMURA Takumi2016-01-101-9/+9
| | | | | | | | | | | definition of nested class would confuse the context. llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2327: 'llvm::OrcExecutionTest::TM' : is not a type name, static, or enumerator llvm\unittests\ExecutionEngine\Orc\ObjectLinkingLayerTest.cpp(115) : error C2065: 'TM' : undeclared identifier FYI, "this->TM" was valid even before moving class SectionMemoryManagerWrapper. llvm-svn: 257290
* [Orc][RuntimeDyld] Prevent duplicate calls to finalizeMemory on shared memoryLang Hames2016-01-091-0/+82
| | | | | | | | | | | | | | | | | | | | | | | managers. Prior to this patch, recursive finalization (where finalization of one RuntimeDyld instance triggers finalization of another instance on which the first depends) could trigger memory access failures: When the inner (dependent) RuntimeDyld instance and its memory manager are finalized, memory allocated (but not yet relocated) by the outer instance is locked, and relocation in the outer instance fails with a memory access error. This patch adds a latch to the RuntimeDyld::MemoryManager base class that is checked by a new method: RuntimeDyld::finalizeWithMemoryManagerLocking, ensuring that shared memory managers are only finalized by the outermost RuntimeDyld instance. This allows ORC clients to supply the same memory manager to multiple calls to addModuleSet. In particular it enables the use of user-supplied memory managers with the CompileOnDemandLayer which must reuse the supplied memory manager for each function that is lazily compiled. llvm-svn: 257263
* [Orc] Add missing file for r251604.Lang Hames2015-10-291-0/+94
llvm-svn: 251605
OpenPOWER on IntegriCloud