[cfe-commits] r41995 - /cfe/trunk/AST/CFG.cpp

Hartmut Kaiser hartmut.kaiser at gmail.com
Sun Sep 16 13:43:07 PDT 2007


Chris, 

> > URL: http://llvm.org/viewvc/llvm-project?rev=41995&view=rev
> > Log:
> > Fixed two problems VC++ revealed in release mode. Please verify.
> 
> This just disables the code - what is the problem that VC++ 
> identifies?

If NDEBUG is defined, the GraphHelper is not declared, which makes the
compiler complain about the code I disabled. I'm not sure if I disabled the
correct parts of the code, though.

Regards Hartmut

> 
> -Chris
> 
> > Modified:
> >     cfe/trunk/AST/CFG.cpp
> >
> > Modified: cfe/trunk/AST/CFG.cpp
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/CFG.cpp? 
> > rev=41995&r1=41994&r2=41995&view=diff
> >
> > 
> ======================================================================
> > ========
> > --- cfe/trunk/AST/CFG.cpp (original)
> > +++ cfe/trunk/AST/CFG.cpp Sat Sep 15 19:28:28 2007
> > @@ -1292,6 +1292,7 @@
> >  struct DOTGraphTraits<const CFG*> : public DefaultDOTGraphTraits {
> >    static std::string getNodeLabel(const CFGBlock* Node, const CFG*
> > Graph) {
> >
> > +#ifndef NDEBUG
> >      std::ostringstream Out;
> >      print_block(Out,Graph, *Node, GraphHelper, false);
> >      std::string OutStr = Out.str();
> > @@ -1306,6 +1307,9 @@
> >        }
> >
> >      return OutStr;
> > +#else
> > +    return "";
> > +#endif
> >    }
> >  };
> >  } // end namespace llvm
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 




More information about the cfe-commits mailing list