From 265c92560db8af7e64dc328cb612076086a62bd1 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 6 Jun 2009 08:21:31 +0000 Subject: Import clang, at r72995. --- lib/Parse/Parser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Parse/Parser.cpp') diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 1c2e8a6..a2a66f9 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -39,6 +39,10 @@ Parser::Parser(Preprocessor &pp, Action &actions) PragmaUnusedHandler(&PP.getIdentifierTable().get("unused"), actions, *this)); PP.AddPragmaHandler(0, UnusedHandler.get()); + + WeakHandler.reset(new + PragmaWeakHandler(&PP.getIdentifierTable().get("weak"), actions)); + PP.AddPragmaHandler(0, WeakHandler.get()); } /// If a crash happens while the parser is active, print out a line indicating @@ -288,6 +292,8 @@ Parser::~Parser() { PackHandler.reset(); PP.RemovePragmaHandler(0, UnusedHandler.get()); UnusedHandler.reset(); + PP.RemovePragmaHandler(0, WeakHandler.get()); + WeakHandler.reset(); } /// Initialize - Warm up the parser. -- cgit v1.1