[llvm-commits] [llvm] r74400 - in /llvm/trunk: include/llvm/Analysis/LoopDependenceAnalysis.h lib/Analysis/LoopDependenceAnalysis.cpp

Andreas Bolka andreas.bolka at gmx.net
Mon Jun 29 11:34:43 PDT 2009


On Mon Jun 29 18:24:55 +0200 2009, Devang Patel wrote:
> Here supporting only raw_ostream from llvm/Support  interface is
> enough, no need to support direct std::ostream interface.

If I don't implement `virtual void print(std::ostream&, const Module*)`,
I get a warning:

    lib/Analysis/LoopDependenceAnalysis.cpp:22: include/llvm/Pass.h:105:
    warning: ‘virtual void llvm::Pass::print(std::ostream&, const
    llvm::Module*) const’ was hidden
    include/llvm/Analysis/LoopDependenceAnalysis.h:49: warning:   by
    ‘void llvm::LoopDependenceAnalysis::print(llvm::raw_ostream&, const
    llvm::Module*) const’

I'll drop the `void print(std::ostream*, const Module*)`.

> On Sat, Jun 27, 2009 at 5:16 PM, Andreas Bolka wrote:
> > --- llvm/trunk/include/llvm/Analysis/LoopDependenceAnalysis.h (original)
> > +++ llvm/trunk/include/llvm/Analysis/LoopDependenceAnalysis.h Sat Jun 27 19:16:08 2009
> >   class LoopDependenceAnalysis : public LoopPass {
> > @@ -39,6 +40,12 @@
> >     bool runOnLoop(Loop*, LPPassManager&);
> >
> >     virtual void getAnalysisUsage(AnalysisUsage&) const;
> > +
> > +   void print(raw_ostream&, const Module* = 0) const;
> > +   virtual void print(std::ostream&, const Module* = 0) const;
> > +   void print(std::ostream *OS, const Module *M = 0) const {
> > +     if (OS) print(*OS, M);
> > +   }
> >   }; // class LoopDependenceAnalysis

-- 
Andreas



More information about the llvm-commits mailing list