From cc94381366ef91887e6d0fad61567a4dc73cdb1d Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 30 Nov 2016 07:14:24 +0100 Subject: [PATCH] Fix flushing issue in drawergen --- tools/drawergen/drawergen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/drawergen/drawergen.cpp b/tools/drawergen/drawergen.cpp index a37f2f26ed..a306f36af2 100644 --- a/tools/drawergen/drawergen.cpp +++ b/tools/drawergen/drawergen.cpp @@ -599,6 +599,10 @@ std::vector LLVMProgram::GenerateObjectFile(std::string cpuName) PerModulePasses.run(*module); // 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 data; data.resize(str.size()); memcpy(data.data(), str.data(), data.size());