[LLVMdev] newbie with pass registering Problem

Devang Patel dpatel at apple.com
Tue Apr 22 09:14:48 PDT 2008

On Apr 22, 2008, at 2:22 AM, Nicole Irwanto wrote:

> Hi!!
> This is my first time with llvm. I'm still learning and really need  
> help.
> I wrote only one Function Pass, which uses another Function Pass  
> (blockNrs), and registered this:
> RegisterPass<FunctionAnalysis> X("gasched", "Genom Scheduling Pass");

> When I compile my sourcecode, everything was okay. But when I tried  
> to test it, i got this error Message:

Did you use static ID ? For example ...

   class VISIBILITY_HIDDEN GVN : public FunctionPass {
     bool runOnFunction(Function &F);
     static char ID; // Pass identification, replacement for typeid
     GVN() : FunctionPass((intptr_t)&ID) { }


More information about the llvm-dev mailing list