[LLVMdev] Followup on Casey's patches

Chris Lattner sabre at nondot.org
Sun Oct 27 14:48:00 PST 2002


In case others are interested in what happened with Casey's patches,
here's the digest:

> Issue: STLExtras.h includes a class mapped_iterator that uses
> std::iterator_traits<> without including <iterator>.
> Fix: have STLExtras.h include Support/iterator.

Applied.

> DSGraph.h has a prototype in it with a std::string& parameter, but does
> not include <string>.

Applied.

> The machinery around the bison call in the Makefile does not work for
> me.  From the source file gram.yc, my bison (version 1.28) generates
> files gram.yc.tab.h and gram.yc.tab.c instead of gram.tab.cc and
> gram.tab.hc.  My fix is to use the -o option to tell bison what to name
> the outputs.

Applied.

> Statistic.cpp uses std::stable_sort without including <algorithm>.

Applied.

> Timer.cpp uses std::greater without including <functional>.

Applied.

> PreSelection.cpp uses the form "++(ConstantExpr*)->op_begin()" in a
> couple of places: gcc2 considers this to be an illegal use of a constant
> reference (the temporary iterator) as an lvalue.  Fix is to use
> "(ConstantExpr*)->op_begin() + 1" instead.

Applied.

> Another "big unsigned constant for 32-bit architecture" warning.

Applied.

> Issue: GraphWriter includes <ostream>, which my gcc2 apparently thinks
> is <ostream.h>.
> Fix: Make a new <Support/ostream> that handles this discrepancy, ala
> <Support/hash_set>.

Fixed by including <iostream> instead of <ostream>.  Noted that GCC 2.x is
not really supported, and that GCC 3.x is preferable.

Thanks for the patches Casey!

-Chris

http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list