summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-03-19 22:13:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-03-19 22:13:20 +0000
commit9507d46d623e440bd4145d9ad89ea850a5737138 (patch)
treeb3e9eca6d782d164c1515b76a338b1b0bceeb344 /clang/lib/Parse/Parser.cpp
parent8aaca67b0ace63b1f87c0bcfb9054ed57ac9d206 (diff)
downloadbcm5719-llvm-9507d46d623e440bd4145d9ad89ea850a5737138.tar.gz
bcm5719-llvm-9507d46d623e440bd4145d9ad89ea850a5737138.zip
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. llvm-svn: 99007
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index e7a771edda4..d45aaed70e5 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud