Surinder
2011-Jan-31 01:24 UTC
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
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
Douglas do Couto Teixeira
2011-Jan-31 01:57 UTC
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
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>
Surinder
2011-Jan-31 02:08 UTC
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
Thank you, that has fixed the compilation error. On Mon, Jan 31, 2011 at 12:57 PM, Douglas do Couto Teixeira <douglasdocouto at gmail.com> wrote:> 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 > >
Apparently Analagous Threads
- [LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
- [LLVMdev] LLVM grammar for ANTLR
- [LLVMdev] LLVM grammar for ANTLR
- [LLVMdev] How to convert an iterator to an object pointer
- [LLVMdev] LLVM grammar for ANTLR