[LLVMdev] Followup on Casey's patches
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.
> DSGraph.h has a prototype in it with a std::string& parameter, but does
> not include <string>.
> 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.
> Statistic.cpp uses std::stable_sort without including <algorithm>.
> Timer.cpp uses std::greater without including <functional>.
> 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.
> Another "big unsigned constant for 32-bit architecture" warning.
> Issue: GraphWriter includes <ostream>, which my gcc2 apparently thinks
> is <ostream.h>.
> Fix: Make a new <Support/ostream> that handles this discrepancy, ala
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!
More information about the llvm-dev