[LLVMdev] Get LLVM assembler for a function.

Dan Gohman gohman at apple.com
Thu Aug 20 18:04:23 PDT 2009


On Aug 19, 2009, at 10:30 PM, Óscar Fuentes wrote:


> We can get the llvm assembler for a Module with something as simple as
>
>      std::ofstream f("code.llvm");
>      f << *M;
>
> Is there a method for obtaining the llvm assembler of a given  
> Function?

In addition to the other answers, f << *F works too.

Dan





More information about the llvm-dev mailing list