Fix build with LLVM top-of-tree

This commit is contained in:
Matt Pharr
2013-07-17 09:25:00 -07:00
parent 8c9e873c10
commit f1cce0ef5f
2 changed files with 10 additions and 0 deletions

View File

@@ -4914,7 +4914,12 @@ WriteCXXFile(llvm::Module *module, const char *fn, int vectorWidth,
pm.add(new llvm::TargetData(module));
#endif
#if defined(LLVM_3_1) || defined(LLVM_3_2) || defined(LLVM_3_3)
int flags = 0;
#else
llvm::sys::fs::OpenFlags flags = llvm::sys::fs::F_None;
#endif
std::string error;
llvm::tool_output_file *of = new llvm::tool_output_file(fn, error, flags);
if (error.size()) {