summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-03-09 22:00:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-03-09 22:00:01 +0000
commit09a7b298c42fdba0f5b2a0832ceb24d17744d539 (patch)
treec2cad5d63cc1568bf8a000159b1aacefebc964cf /include
parent21af18162eb21419072e982fefc3c99a80ca1670 (diff)
Add -cc1 flag -ast-dump-all to perform an AST dump including entities that haven't yet been deserialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297412 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclBase.h5
-rw-r--r--include/clang/Driver/CC1Options.td2
-rw-r--r--include/clang/Frontend/ASTConsumers.h2
-rw-r--r--include/clang/Frontend/FrontendOptions.h2
4 files changed, 8 insertions, 3 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index e4894539bb..c88cb6a8fd 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -1029,7 +1029,7 @@ public:
void dump() const;
// Same as dump(), but forces color printing.
void dumpColor() const;
- void dump(raw_ostream &Out) const;
+ void dump(raw_ostream &Out, bool Deserialize = false) const;
/// \brief Looks through the Decl's underlying type to extract a FunctionType
/// when possible. Will return null if the type underlying the Decl does not
@@ -1810,7 +1810,8 @@ public:
void dumpDeclContext() const;
void dumpLookups() const;
- void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls = false) const;
+ void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls = false,
+ bool Deserialize = false) const;
private:
void reconcileExternalVisibleStorage() const;
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index c1af47e0d7..ab90a64fdb 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -475,6 +475,8 @@ def ast_list : Flag<["-"], "ast-list">,
HelpText<"Build ASTs and print the list of declaration node qualified names">;
def ast_dump : Flag<["-"], "ast-dump">,
HelpText<"Build ASTs and then debug dump them">;
+def ast_dump_all : Flag<["-"], "ast-dump-all">,
+ HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
HelpText<"Build ASTs and then debug dump their name lookup tables">;
def ast_view : Flag<["-"], "ast-view">,
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h
index b76bfcbe46..53975a07ea 100644
--- a/include/clang/Frontend/ASTConsumers.h
+++ b/include/clang/Frontend/ASTConsumers.h
@@ -37,7 +37,7 @@ std::unique_ptr<ASTConsumer> CreateASTPrinter(std::unique_ptr<raw_ostream> OS,
// AST dumper: dumps the raw AST in human-readable form to stderr; this is
// intended for debugging.
std::unique_ptr<ASTConsumer> CreateASTDumper(StringRef FilterString,
- bool DumpDecls,
+ bool DumpDecls, bool Deserialize,
bool DumpLookups);
// AST Decl node lister: prints qualified names of all filterable AST Decl
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h
index aa9ddffb79..4fd0f82a3a 100644
--- a/include/clang/Frontend/FrontendOptions.h
+++ b/include/clang/Frontend/FrontendOptions.h
@@ -157,6 +157,8 @@ public:
///< global module index if needed.
unsigned ASTDumpDecls : 1; ///< Whether we include declaration
///< dumps in AST dumps.
+ unsigned ASTDumpAll : 1; ///< Whether we deserialize all decls
+ ///< when forming AST dumps.
unsigned ASTDumpLookups : 1; ///< Whether we include lookup table
///< dumps in AST dumps.
unsigned BuildingImplicitModule : 1; ///< Whether we are performing an