diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-03-27 16:47:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-03-27 16:47:18 +0000 |
commit | c544ba09695e300f31355af342258bd57619e737 (patch) | |
tree | 9947152b05a7ad85b91ab837892ae6bbb67d1e12 /include/clang/Frontend | |
parent | 8343f8e00a222ca09dde536c77313e3e6e03ad59 (diff) |
<rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file.
This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178148 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r-- | include/clang/Frontend/FrontendActions.h | 17 | ||||
-rw-r--r-- | include/clang/Frontend/FrontendOptions.h | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h index 477ac45a95..178619047a 100644 --- a/include/clang/Frontend/FrontendActions.h +++ b/include/clang/Frontend/FrontendActions.h @@ -123,7 +123,7 @@ public: std::string &OutputFile, raw_ostream *&OS); }; - + class SyntaxOnlyAction : public ASTFrontendAction { protected: virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, @@ -133,6 +133,21 @@ public: virtual bool hasCodeCompletionSupport() const { return true; } }; +/// \brief Dump information about the given module file, to be used for +/// basic debugging and discovery. +class DumpModuleInfoAction : public ASTFrontendAction { +protected: + virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, + StringRef InFile); + virtual void ExecuteAction(); + +public: + virtual bool hasPCHSupport() const { return false; } + virtual bool hasASTFileSupport() const { return true; } + virtual bool hasIRSupport() const { return false; } + virtual bool hasCodeCompletionSupport() const { return false; } +}; + /** * \brief Frontend action adaptor that merges ASTs together. * diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h index c39c1908a7..234e3446c8 100644 --- a/include/clang/Frontend/FrontendOptions.h +++ b/include/clang/Frontend/FrontendOptions.h @@ -43,6 +43,7 @@ namespace frontend { GeneratePCH, ///< Generate pre-compiled header. GeneratePTH, ///< Generate pre-tokenized header. InitOnly, ///< Only execute frontend initialization. + ModuleFileInfo, ///< Dump information about a module file. ParseSyntaxOnly, ///< Parse and perform semantic analysis. PluginAction, ///< Run a plugin action, \see ActionName. PrintDeclContext, ///< Print DeclContext and their Decls. |