Update LLVM 6.0 WIP RC1

This commit is contained in:
Zangetsu38 2017-11-04 02:30:11 +01:00
parent d9b394d42f
commit 2e53d40353
8 changed files with 20 additions and 12 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;
}