clang-tools 3.8.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Classes | Typedefs | Functions | Variables
Modularize.cpp File Reference
`#include "Modularize.h"`
`#include "ModularizeUtilities.h"`
`#include "PreprocessorTracker.h"`
`#include "clang/AST/ASTConsumer.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/RecursiveASTVisitor.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Driver/Options.h"`
`#include "clang/Frontend/CompilerInstance.h"`
`#include "clang/Frontend/FrontendActions.h"`
`#include "clang/Lex/Preprocessor.h"`
`#include "clang/Tooling/CompilationDatabase.h"`
`#include "clang/Tooling/Tooling.h"`
`#include "llvm/Option/Arg.h"`
`#include "llvm/Option/ArgList.h"`
`#include "llvm/Option/OptTable.h"`
`#include "llvm/Option/Option.h"`
`#include "llvm/Support/CommandLine.h"`
`#include "llvm/Support/FileSystem.h"`
`#include "llvm/Support/MemoryBuffer.h"`
`#include "llvm/Support/Path.h"`
`#include <algorithm>`
`#include <fstream>`
`#include <iterator>`
`#include <string>`
`#include <vector>`
Include dependency graph for Modularize.cpp:

Go to the source code of this file.

## Classes
struct | Location
struct | Entry
struct | HeaderEntry
class | EntityMap
class | CollectEntitiesVisitor
class | CollectEntitiesConsumer
class | CollectEntitiesAction
class | ModularizeFrontendActionFactory
class | CompileCheckVisitor
class | CompileCheckConsumer
class | CompileCheckAction
class | CompileCheckFrontendActionFactory

## Typedefs
typedef std::vector< HeaderEntry > | HeaderContents

## Functions
static cl::list< std::string > | ListFileNames (cl::Positional, cl::value_desc("list"), cl::desc("<list of one or more header list files>"), cl::CommaSeparated)
static cl::list< std::string > | CC1Arguments (cl::ConsumeAfter, cl::desc("<arguments to be passed to front end>..."))
static cl::opt< std::string > | HeaderPrefix ("prefix", cl::init(""), cl::desc("Prepend header file paths with this prefix."" If not specified,"" the files are considered to be relative to the header list file."))
static cl::opt< std::string > | ModuleMapPath ("module-map-path", cl::init(""), cl::desc("Turn on module map output and specify output path or file name."" If no path is specified and if prefix option is specified,"" use prefix for file path."))
static cl::opt< std::string > | ProblemFilesList ("problem-files-list", cl::init(""), cl::desc("List of files with compilation or modularization problems for"" assistant mode. This will be excluded."))
static cl::opt< std::string > | RootModule ("root-module", cl::init(""), cl::desc("Specify the name of the root module."))
static cl::opt< bool > | BlockCheckHeaderListOnly ("block-check-header-list-only", cl::init(false), cl::desc("Only warn if #include directives are inside extern or namespace"" blocks if the included header is in the header list."))
static cl::list< std::string > | IncludePaths ("I", cl::desc("Include path for coverage check."), cl::ZeroOrMore, cl::value_desc("path"))
static cl::opt< bool > | NoCoverageCheck ("no-coverage-check", cl::init(false), cl::desc("Don't do the coverage check."))
static cl::opt< bool > | CoverageCheckOnly ("coverage-check-only", cl::init(false), cl::desc("Only do the coverage check."))
static cl::opt< bool > | DisplayFileLists ("display-file-lists", cl::init(false), cl::desc("Display lists of good files (no compile errors), problem files,"" and a combined list with problem files preceded by a '#'."))
static std::string | findInputFile (const CommandLineArguments &CLArgs)
static ArgumentsAdjuster | getModularizeArgumentsAdjuster (DependencyMap &Dependencies)
int | main (int Argc, const char **Argv)

## Variables
const char * | Argv0
std::string | CommandLine

## Typedef Documentation

typedef std::vector<HeaderEntry> HeaderContents

Definition at line 486 of file Modularize.cpp.

## Function Documentation

static cl::opt<bool> BlockCheckHeaderListOnly | ( | "block-check-header-list-only" | ,
|  | cl:: | initfalse,
|  | cl:: | desc"Only warn if #include directives are inside extern or namespace"" blocks if the included header is in the header list."
| ) |  |
| static

Referenced by main().

static cl::list<std::string> CC1Arguments | ( | cl::ConsumeAfter | ,
|  | cl:: | desc"<arguments to be passed to front end>..."
| ) |  |
| static

Referenced by main().

static cl::opt<bool> CoverageCheckOnly | ( | "coverage-check-only" | ,
|  | cl:: | initfalse,
|  | cl:: | desc"Only do the coverage check."
| ) |  |
| static

Referenced by main().

static cl::opt<bool> DisplayFileLists | ( | "display-file-lists" | ,
|  | cl:: | initfalse,
|  | cl:: | desc"Display lists of good files (no compile errors), problem files,"" and a combined list with problem files preceded by a '#'."
| ) |  |
| static

Referenced by main().

static std::string findInputFile | ( | const CommandLineArguments & | CLArgs | ) |
| static

Definition at line 339 of file Modularize.cpp.

Referenced by getModularizeArgumentsAdjuster().

static ArgumentsAdjuster getModularizeArgumentsAdjuster | ( | DependencyMap & | Dependencies | ) |
| static

Definition at line 358 of file Modularize.cpp.

References File, and findInputFile().

Referenced by main().

static cl::opt<std::string> HeaderPrefix | ( | "prefix" | ,
|  | cl:: | init"",
|  | cl:: | desc"Prepend header file paths with this prefix."" If not specified,"" the files are considered to be relative to the header list file."
| ) |  |
| static

Referenced by main(), and writeModuleMap().

static cl::list<std::string> IncludePaths | ( | "I" | ,
|  | cl:: | desc"Include path for coverage check.",
|  | cl::ZeroOrMore | ,
|  | cl:: | value_desc"path"
| ) |  |
| static

Referenced by main().

static cl::list<std::string> ListFileNames | ( | cl::Positional | ,
|  | cl:: | value_desc"list",
|  | cl:: | desc"<list of one or more header list files>",
|  | cl::CommaSeparated |
| ) |  |
| static

Referenced by main().

int main | ( | int | Argc,
|  | const char ** | Argv
| ) |  |

Definition at line 806 of file Modularize.cpp.

References Argv0, BlockCheckHeaderListOnly(), CC1Arguments(), CommandLine, CoverageCheckOnly(), createModuleMap(), DisplayFileLists(), Entry::EK_NumberOfKinds, Entry::getKindName(), getModularizeArgumentsAdjuster(), EntityMap::HeaderContentMismatches, HeaderPrefix(), IncludePaths(), ListFileNames(), ModuleMapPath(), NoCoverageCheck(), PPTracker, ProblemFilesList(), and RootModule().

static cl::opt<std::string> ModuleMapPath | ( | "module-map-path" | ,
|  | cl:: | init"",
|  | cl:: | desc"Turn on module map output and specify output path or file name."" If no path is specified and if prefix option is specified,"" use prefix for file path."
| ) |  |
| static

Referenced by main(), and writeModuleMap().

static cl::opt<bool> NoCoverageCheck | ( | "no-coverage-check" | ,
|  | cl:: | initfalse,
|  | cl:: | desc"Don't do the coverage check."
| ) |  |
| static

Referenced by main().

static cl::opt<std::string> ProblemFilesList | ( | "problem-files-list" | ,
|  | cl:: | init"",
|  | cl:: | desc"List of files with compilation or modularization problems for"" assistant mode. This will be excluded."
| ) |  |
| static

Referenced by main().

static cl::opt<std::string> RootModule | ( | "root-module" | ,
|  | cl:: | init"",
|  | cl:: | desc"Specify the name of the root module."
| ) |  |
| static

Referenced by addModuleDescription(), createModuleMap(), loadModuleDescriptions(), and main().

## Variable Documentation

const char* Argv0

Definition at line 334 of file Modularize.cpp.

Referenced by main(), and writeModuleMap().

std::string CommandLine

Definition at line 336 of file Modularize.cpp.

Referenced by main(), and writeModuleMap().