[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
Surinder
surifilms at gmail.com
Sun Jan 30 18:08:50 PST 2011
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
>
>
More information about the llvm-dev
mailing list