Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | SmallVector<char, 1> ClonedModuleBuffer; | ||||
BCWriter.writeStrtab(); | BCWriter.writeStrtab(); | ||||
} | } | ||||
MemoryBufferRef ClonedModuleBufferRef( | MemoryBufferRef ClonedModuleBufferRef( | ||||
StringRef(ClonedModuleBuffer.data(), ClonedModuleBuffer.size()), | StringRef(ClonedModuleBuffer.data(), ClonedModuleBuffer.size()), | ||||
"cloned module buffer"); | "cloned module buffer"); | ||||
ThreadSafeContext NewTSCtx(std::make_unique<LLVMContext>()); | ThreadSafeContext NewTSCtx(std::make_unique<LLVMContext>()); | ||||
auto ClonedModule = cantFail( | auto ClonedModule = llvm_cantFail( | ||||
parseBitcodeFile(ClonedModuleBufferRef, *NewTSCtx.getContext())); | parseBitcodeFile(ClonedModuleBufferRef, *NewTSCtx.getContext())); | ||||
ClonedModule->setModuleIdentifier(M.getName()); | ClonedModule->setModuleIdentifier(M.getName()); | ||||
return ThreadSafeModule(std::move(ClonedModule), std::move(NewTSCtx)); | return ThreadSafeModule(std::move(ClonedModule), std::move(NewTSCtx)); | ||||
}); | }); | ||||
} | } | ||||
} // end namespace orc | } // end namespace orc | ||||
} // end namespace llvm | } // end namespace llvm |