[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
Douglas do Couto Teixeira
douglasdocouto at gmail.com
Sun Jan 30 17:57:35 PST 2011
Hi Surinder,
Did you remember to #include "llvm/Analysis/Dominators.h"?
Best,
Douglas
On Sun, Jan 30, 2011 at 11:24 PM, Surinder <surifilms at gmail.com> wrote:
> I am creating a new pass (function pass) called Dfl from the Hello
> example and notes on "Writing an LLVM Pass". When I compile the
> program I get inncomplete type error (llvm/include/llvm/Pass.h:188:
> error: incomplete type 'llvm::DominatorTree' used in nested name
> specifier). The code is given below.
>
> Surinder
>
> struct Dfl : public FunctionPass {
> raw_ostream *Out;
> static char ID;
> //
> Dfl() : FunctionPass(&ID) { }
> //
> virtual bool runOnFunction(Function &F) {
> // //BlocksCounter++; EdgesCounter++; InstCounter++;
> bool modified=false;
> errs() << "In Dfl for Function : " << F.getName();
> if (F.empty()) errs() << " is empty." << "\n";
> else errs() << "\n";
> // DT = &getAnalysis<DominatorTree>();
> modified = printDfl(Out, &F); // , &DT);
> return modified;
> };
> // pass interface to other passes
> virtual void getAnalysisUsage(AnalysisUsage &AU) const {
> AU.setPreservesAll();
> AU.addRequired<DominatorTree>(); /// ***error
> line ***********
> }
>
>
> }; // end struc Dfl
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110130/fbae2ad3/attachment.html>
More information about the llvm-dev
mailing list