Some folks on #llvm helped me with this - the solution is to create a virtual file using FileManager::getVirtualFile, and populate it with the buffer's contents using SourceManager::overrideFileContents, then pass the virtual file to the FrontendAction.<div>
<br></div><div>Hope that helps,</div><div>Mike</div><div><br><div class="gmail_quote">On Fri, May 7, 2010 at 3:30 PM, Mike Miller <span dir="ltr"><<a href="mailto:michael.g.miller@gmail.com">michael.g.miller@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>I want to have the output of a FrontendAction(specifically an EmitObjAction) piped into a MemoryBuffer, instead of a file. What's the most straightforward way to do this?</div>
<div><br></div><div>
Thanks,</div><div>Mike</div>
</blockquote></div><br></div>