diff options
Diffstat (limited to 'src/parsers/decl/function_decl.cpp')
-rw-r--r-- | src/parsers/decl/function_decl.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/parsers/decl/function_decl.cpp b/src/parsers/decl/function_decl.cpp index f8a5579..3bd774d 100644 --- a/src/parsers/decl/function_decl.cpp +++ b/src/parsers/decl/function_decl.cpp @@ -19,6 +19,8 @@ #include "includes/parserincludes.h" +#include "command.h" + parserDefine(FunctionDecl); #include "parsers/base/decl.h" @@ -35,6 +37,15 @@ void parseFunctionDeclNode(FunctionDeclNode *node) fillLocation(node); fillDeclLabel(node); + bool spoofCommand(false); + Command oldCommand = command; + if (!node->parent && !dumpFile.empty() && node->file == dumpFile) + { + spoofCommand = true; + enableCommand(Dump); + Log::log("start dump\n"); + } + Log::dump(node); fillDeclAutoGenerated(node); @@ -79,6 +90,12 @@ void parseFunctionDeclNode(FunctionDeclNode *node) node, DECL_FUNCTION_SPECIFIC_OPTIMIZATION(node->gccNode), "optiomisations"); + + if (spoofCommand) + { + command = oldCommand; + Log::log("end dump\n"); + } } } |