[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-dev
Subject:    [LLVMdev] Re: getAnalysis
From:       Chris Lattner <sabre () nondot ! org>
Date:       2002-11-21 23:00:01
Message-ID: Pine.LNX.4.44.0211212306560.27190-100000 () nondot ! org
[Download RAW message or body]

On Thu, 21 Nov 2002, Juan Nicolas Ruiz wrote:

> sorry for sending this question just to you: What do I need to include
> or declare in order to be able to use an external analysis? I'm trying
> to do:
>
> DSGraph* DSG = getAnalysis<BUDataStructures>().getDSGraph(F);
>
> I have
> #include "llvm/PassAnalysisSupport.h"   // getAnalysis

Please do not ever #include this file directly, always #include Pass.h

> but still keep getting the error:
> MemLeak.cpp:34: `getAnalysis' undeclared (first use this function)

You must call it from one of the methods of your Pass subclass.  IOW, the
"this" object that the getAnalyisis method expects is a Pass.

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic