[llvm-commits] CVS: llvm/lib/Reoptimizer/Mapping/getLLVMinfo.cpp
sabre at nondot.org
Wed Sep 11 18:24:00 PDT 2002
> > If you could, please prune these #includes if you get a chance...
> Would it make sense to do this on a larger scale? There are a couple files
> that include both Module and Function, for instance.
Yes, please. Including lots of .h files is a very bad idea for lots of
reasons (slows down compilation, adds false dependencies, etc) for C++
files, but especially for .h files.
> On the other hand, each file lists what it uses, and if anytime something
> is refactored, it'll lead to a lot of broken code (correct me if I'm
That's true, but when refactoring code, it's good to be aware of what .h
files are needed or not anyway, so there it usually isn't an issue. If
you make sure to compile the code before checking it in, the compiler will
tell you if you are missing a .h file. Unfortunately it won't tell you if
you have an extraneous one.
This is a low priority activity, but if you notice lots of #includes in
.cpp files, pruning them is always useful. Pruning unneccesary #includes
from .h files is VERY important though. :)
More information about the llvm-commits