[LLVMdev] llvm::LoopPass

Edvard Ghazaryan edvard_gh at yahoo.com
Sun Jul 22 21:45:29 PDT 2012



Hello .

I'm trying to implement LoopPass.
Here is simple code : 

  class LoopParser: public llvm::LoopPass
  {
    public:
      static char ID;

    public:
      virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const
      {
        AU.addRequiredID(llvm::LoopSimplifyID);
        AU.addPreservedID(llvm::LoopSimplifyID);
        AU.addRequired<llvm::LoopInfo>();
      }

      virtual bool runOnLoop(llvm::Loop* IncomingLoop,
                             llvm::LPPassManager& LPM_Ref)
     { return false; }

      LoopParser() : llvmLoopPass(ID)
      {}
  };
char LoopParser::ID = 0;
static llvm::RegisterPass<LoopParser> XX("LoopParser", "TODO ", false, false);

when I'am trying to load  a get the error message : undefined symbol: _ZTIN4llvm8LoopPassE
How can I fix?

Thanks in advance,
Edvard 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120722/d3f19e4c/attachment.html>


More information about the llvm-dev mailing list