[LLVMdev] Get LLVM assembler for a function.

Óscar Fuentes ofv at wanadoo.es
Thu Aug 20 18:25:21 PDT 2009


Hello Dan.

Dan Gohman <gohman at apple.com> writes:

>> Is there a method for obtaining the llvm assembler of a given  
>> Function?
>
> In addition to the other answers, f << *F works too.

>From that code, I expected to see the declaration of the function. So
checked and it prints the declaration if the function is empty (no
instructions added yet) and the disassembly if it has instructions. That
makes sense, but sometimes it is useful to output just the declaration. I
guess there is a method for that somewhere. In the meantime, outputting
the function's type and name can do the job.

-- 
Óscar




More information about the llvm-dev mailing list