[LLVMdev] include files
Preston Briggs
preston.briggs at gmail.com
Mon Jun 11 16:04:15 PDT 2012
The LLVM Coding Standards discuss include files at some length.
Suggests that the minimal list of includes be listed.
Experimenting, I find the list is much shorter that used by most passes,
perhaps only 3 or 4 files, probably because the necessary declarations
are included indirectly. For example, I might get away with
a .h file including only
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/ADT/SmallBitVector.h"
and a .cpp file including only
#include "myHeader.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Support/InstIterator.h"
Is it good style to cut the list down to the bare minimum like this?
Thanks,
Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120611/090ed848/attachment.html>
More information about the llvm-dev
mailing list