Update LLVM 6.0.

This commit is contained in:
Zangetsu38 2017-11-04 02:30:11 +01:00
parent 2b3df37400
commit db96c355ce
9 changed files with 21 additions and 13 deletions

View file

@ -376,11 +376,11 @@ public:
LOG_SUCCESS(GENERAL, "LLVM: Created module: %s", module->getName().data());
}
static std::unique_ptr<llvm::MemoryBuffer> load(const std::string& path)
static std::unique_ptr<llvm::WritableMemoryBuffer> load(const std::string& path)
{
if (fs::file cached{path, fs::read})
{
auto buf = llvm::MemoryBuffer::getNewUninitMemBuffer(cached.size());
auto buf = llvm::WritableMemoryBuffer::getNewUninitMemBuffer(cached.size());
cached.read(const_cast<char*>(buf->getBufferStart()), buf->getBufferSize());
return buf;
}