abduld / llvm-lua

Automatically exported from code.google.com/p/llvm-lua
Other
0 stars 0 forks source link

Use llvm::raw_fd_ostream instead of std::ofstream #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compilation llvm-lua with llvm-svn HEAD results in an error because
WriteBitcodeFile no longer takes std::ofstream as a parameter.

The attached patch fixes this problem - could you check whether its valid.
It should be backwards compatible with LLVM 2.6 as well because the
std:ofstream parameter was deprecated (I believe).

Original issue reported on code.google.com by tcmreast...@gmail.com on 13 Dec 2009 at 3:45

Attachments:

GoogleCodeExporter commented 9 years ago
!error.empty() is meant to be error.empty() in the patch

Original comment by tcmreast...@gmail.com on 17 Dec 2009 at 8:39

GoogleCodeExporter commented 9 years ago
This patch brakes LLVM 2.6 support.  llvm::raw_fd_ostream doesn't have the same
constructor in LLVM 2.6 as llvm-svn HEAD.

llvm::raw_fd_ostream in LLVM 2.6:
raw_fd_ostream(const char *Filename, bool Binary, bool Force, std::string 
&ErrorInfo);
raw_fd_ostream(int fd, bool shouldClose, bool unbuffered=false);

Original comment by rjakabo...@gmail.com on 18 Dec 2009 at 12:23

GoogleCodeExporter commented 9 years ago
I need to try with llvm-2.6 but it seems the default packages provided with my 
OS
can't compile llvm-lua. I'll look into it.

Original comment by tcmreast...@gmail.com on 18 Dec 2009 at 6:44

GoogleCodeExporter commented 9 years ago
LLVM 2.7 support added in llvm-lua verion 1.2.0

Original comment by rjakabo...@gmail.com on 28 Apr 2010 at 11:38