[LLVMdev] Get LLVM assembler for a function.

Eli Friedman eli.friedman at gmail.com
Wed Aug 19 22:41:33 PDT 2009


On Wed, Aug 19, 2009 at 10:30 PM, Óscar Fuentes<ofv at wanadoo.es> 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?

I think something like "F->print(f);" will do the right thing.

-Eli




More information about the llvm-dev mailing list