The LLVM Coding Standards discuss include files at some length.<div>Suggests that the minimal list of includes be listed.</div><div>Experimenting, I find the list is much shorter that used by most passes,</div><div>perhaps only 3 or 4 files, probably because the necessary declarations</div>
<div>are included indirectly. For example, I might get away with</div><div>a .h file including only</div><div><br></div><div><div>#include "llvm/Analysis/AliasAnalysis.h"</div><div>#include "llvm/Analysis/LoopInfo.h"</div>
<div>#include "llvm/ADT/SmallBitVector.h"</div></div><div><br></div><div>and a .cpp file including only</div><div><br></div><div><div>#include "myHeader.h"</div><div>#include "llvm/Analysis/ScalarEvolutionExpressions.h"</div>
<div>#include "llvm/Analysis/ValueTracking.h"</div><div>#include "llvm/Support/InstIterator.h"</div></div><div><br></div><div>Is it good style to cut the list down to the bare minimum like this?</div><div>
<br></div><div>Thanks,</div><div>Preston</div><div><br></div>