<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18882"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>I'm attempting to use file I/O across platforms
from LLVM assembly using the standard GNU C library: fprintf(),
stdin/stdout, etc. Ideally I'd like to simply provide a single bitcode
file that could be compiled on each platform, but because the internals of the
I/O on each platform is different, this is not currently workable.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>So my question is this: How do you suggest doing
I/O in a portable way from LLVM assembly?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>My current thoughts run along two lines:</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>1. Writing a non-portable wrapper around the I/O
routines to present a common interface to the calling module.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>2. Conditional assembly for each platform, but I
don't see any facilities for this in LLVM assembly.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Are there any other ways to do this or any projects in
the works that may provide a solution?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Thanks,</FONT></DIV>
<DIV><FONT face=Calibri>Mike</FONT></DIV></BODY></HTML>