summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/Modularize.cpp
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2015-02-18 16:14:32 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2015-02-18 16:14:32 +0000
commit9cb79646418c49f86310e717e77cf552310d7bab (patch)
tree3d6e6649f483c8480c69e5fc3ecb6b9a00b9d897 /clang-tools-extra/modularize/Modularize.cpp
parent62ef8a5a8871aa057f08ac8c80dc6d58c85bf5e6 (diff)
downloadbcm5719-llvm-9cb79646418c49f86310e717e77cf552310d7bab.tar.gz
bcm5719-llvm-9cb79646418c49f86310e717e77cf552310d7bab.zip
Added support for extracting headers from module maps as a source for the header list.
llvm-svn: 229692
Diffstat (limited to 'clang-tools-extra/modularize/Modularize.cpp')
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index c673ceadd9b..4578185efa5 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -8,25 +8,40 @@
//===----------------------------------------------------------------------===//
//
// This file implements a tool that checks whether a set of headers provides
-// the consistent definitions required to use modules. For example, it detects
-// whether the same entity (say, a NULL macro or size_t typedef) is defined in
-// multiple headers or whether a header produces different definitions under
+// the consistent definitions required to use modules. It can also check an
+// existing module map for full coverage of the headers in a directory tree.
+//
+// For example, in examining headers, it detects whether the same entity
+// (say, a NULL macro or size_t typedef) is defined in multiple headers
+// or whether a header produces different definitions under
// different circumstances. These conditions cause modules built from the
// headers to behave poorly, and should be fixed before introducing a module
// map.
//
-// Modularize takes as argument one or more file names for files containing
-// newline-separated lists of headers to check with respect to each other.
+// Modularize takes as input either one or more module maps (by default,
+// "module.modulemap") or one or more text files contatining lists of headers
+// to check.
+//
+// In the case of a module map, the module map must be well-formed in
+// terms of syntax. Modularize will extract the header file names
+// from the map. Only normal headers are checked, assuming headers
+// marked "private", "textual", or "exclude" are not to be checked
+// as a top-level include, assuming they either are included by
+// other headers which are checked, or they are not suitable for
+// modules.
+//
+// In the case of a file list, the list is a newline-separated list of headers
+// to check with respect to each other.
// Lines beginning with '#' and empty lines are ignored.
// Header file names followed by a colon and other space-separated
// file names will include those extra files as dependencies.
// The file names can be relative or full paths, but must be on the
// same line.
//
-// Modularize also accepts regular front-end arguments.
+// Modularize also accepts regular clang front-end arguments.
//
-// Usage: modularize [-prefix (optional header path prefix)]
-// (include-files_list)[,(include-files_list)]* [(front-end-options) ...]
+// Usage: modularize [(modularize options)]
+// [(include-files_list)|(module map)]+ [(front-end-options) ...]
//
// Options:
// -prefix (optional header path prefix)
OpenPOWER on IntegriCloud