[LLVMdev] New transformation

Eli Friedman eli.friedman at gmail.com
Sat May 23 02:14:41 PDT 2009

On Sat, May 23, 2009 at 12:40 AM, Rotem Varon <varonrotem at gmail.com> wrote:
> Hi,
> I am writing a new transformation (Basic block pass).
> In the "\llvm-2.5\lib\VMCore\AsmWriter.cpp " file there are some of function
> i want to use.
> What do i need to add to the transformation code, so i will be able to use
> those functions?
> I tried to use a function and got this error : 'AssemblyWriter' was not
> declared in this scope.

You can't use AssemblyWriter directly... note that it's not declared
in a header.  If you want to print out an instruction, you can just
use I->dump() or I->print(outputstream); see


More information about the llvm-dev mailing list