mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 20:26:07 +00:00
Give ExecutionEngine of top level buffers.
Long term the idea if for the engine to not own the buffers, but for now this is consistent with the rest of the API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -107,8 +107,6 @@ bool MCJIT::removeModule(Module *M) {
|
||||
return OwnedModules.removeModule(M);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MCJIT::addObjectFile(std::unique_ptr<object::ObjectFile> Obj) {
|
||||
ObjectImage *LoadedObject = Dyld.loadObject(std::move(Obj));
|
||||
if (!LoadedObject || Dyld.hasError())
|
||||
@@ -119,11 +117,15 @@ void MCJIT::addObjectFile(std::unique_ptr<object::ObjectFile> Obj) {
|
||||
NotifyObjectEmitted(*LoadedObject);
|
||||
}
|
||||
|
||||
void MCJIT::addObjectFile(object::OwningBinary<object::ObjectFile> Obj) {
|
||||
addObjectFile(std::move(Obj.getBinary()));
|
||||
Buffers.push_back(std::move(Obj.getBuffer()));
|
||||
}
|
||||
|
||||
void MCJIT::addArchive(object::OwningBinary<object::Archive> A) {
|
||||
Archives.push_back(std::move(A));
|
||||
}
|
||||
|
||||
|
||||
void MCJIT::setObjectCache(ObjectCache* NewCache) {
|
||||
MutexGuard locked(lock);
|
||||
ObjCache = NewCache;
|
||||
|
Reference in New Issue
Block a user