diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-19 22:13:20 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-19 22:13:20 +0000 |
commit | c6fbbedb3e90ff2f04828c36fd839e01468679f5 (patch) | |
tree | 5f1f7fe2a21407403bdd85dd1c7262c6c2652d4a /lib/Parse/Parser.cpp | |
parent | 1b058e8956ea29a7fb7649fdee2b80581dcbdf39 (diff) |
Remove the capture, serialization, and deserialization of comment
ranges as part of the ASTContext. This code is not and was never used,
but contributes ~250k to the size of the Cocoa.h precompiled
header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index e7a771edda..d45aaed70e 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -21,20 +21,6 @@ #include "ParsePragma.h" using namespace clang; -/// \brief A comment handler that passes comments found by the preprocessor -/// to the parser action. -class ActionCommentHandler : public CommentHandler { - Action &Actions; - -public: - explicit ActionCommentHandler(Action &Actions) : Actions(Actions) { } - - virtual bool HandleComment(Preprocessor &PP, SourceRange Comment) { - Actions.ActOnComment(Comment); - return false; - } -}; - Parser::Parser(Preprocessor &pp, Action &actions) : CrashInfo(*this), PP(pp), Actions(actions), Diags(PP.getDiagnostics()), GreaterThanIsOperator(true), ColonIsSacred(false), @@ -59,9 +45,6 @@ Parser::Parser(Preprocessor &pp, Action &actions) WeakHandler.reset(new PragmaWeakHandler(&PP.getIdentifierTable().get("weak"), actions)); PP.AddPragmaHandler(0, WeakHandler.get()); - - CommentHandler.reset(new ActionCommentHandler(actions)); - PP.AddCommentHandler(CommentHandler.get()); } /// If a crash happens while the parser is active, print out a line indicating @@ -317,7 +300,6 @@ Parser::~Parser() { UnusedHandler.reset(); PP.RemovePragmaHandler(0, WeakHandler.get()); WeakHandler.reset(); - PP.RemoveCommentHandler(CommentHandler.get()); } /// Initialize - Warm up the parser. |