Fix flushing issue in drawergen

This commit is contained in:
Magnus Norddahl 2016-11-30 07:14:24 +01:00
parent 284a99f204
commit cc94381366

View file

@ -599,6 +599,10 @@ std::vector<uint8_t> LLVMProgram::GenerateObjectFile(std::string cpuName)
PerModulePasses.run(*module); PerModulePasses.run(*module);
// Return the resulting object file // Return the resulting object file
stream.flush();
#if LLVM_VERSION_MAJOR < 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR < 8)
vecstream.flush();
#endif
std::vector<uint8_t> data; std::vector<uint8_t> data;
data.resize(str.size()); data.resize(str.size());
memcpy(data.data(), str.data(), data.size()); memcpy(data.data(), str.data(), data.size());