diff options
author | Steve Naroff <snaroff@apple.com> | 2007-10-31 20:55:39 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-10-31 20:55:39 +0000 |
commit | b4292f221fb879fd2274683ace4f73d3d99af8c5 (patch) | |
tree | 8d0da1c4329f7c054ff4fdf85072d4660332f8f6 /Driver | |
parent | 9b181b3eec13686ac05fb2c57c3f4baf2d4074a9 (diff) |
Implement ObjC built-in types in MinimalAction.
This fixes the recent regression with selector-1.m and -parse-noop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43575 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver')
-rw-r--r-- | Driver/PrintParserCallbacks.cpp | 7 | ||||
-rw-r--r-- | Driver/clang.cpp | 5 | ||||
-rw-r--r-- | Driver/clang.h | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/Driver/PrintParserCallbacks.cpp b/Driver/PrintParserCallbacks.cpp index d7deb43f87..9568b87211 100644 --- a/Driver/PrintParserCallbacks.cpp +++ b/Driver/PrintParserCallbacks.cpp @@ -21,6 +21,9 @@ using namespace clang; namespace { class ParserPrintActions : public MinimalAction { + public: + ParserPrintActions(IdentifierTable &IT) : MinimalAction(IT) {} + /// ActOnDeclarator - This callback is invoked when a declarator is parsed /// and 'Init' specifies the initializer if any. This is for things like: /// "int X = 4" or "typedef int foo". @@ -49,6 +52,6 @@ namespace { }; } -MinimalAction *clang::CreatePrintParserActionsAction() { - return new ParserPrintActions(); +MinimalAction *clang::CreatePrintParserActionsAction(IdentifierTable &IT) { + return new ParserPrintActions(IT); } diff --git a/Driver/clang.cpp b/Driver/clang.cpp index 6e0ed914e2..77779f7e80 100644 --- a/Driver/clang.cpp +++ b/Driver/clang.cpp @@ -763,12 +763,13 @@ static void ProcessInputFile(Preprocessor &PP, unsigned MainFileID, break; case ParseNoop: // -parse-noop - ParseFile(PP, new MinimalAction(), MainFileID); + ParseFile(PP, new MinimalAction(PP.getIdentifierTable()), MainFileID); ClearSourceMgr = true; break; case ParsePrintCallbacks: - ParseFile(PP, CreatePrintParserActionsAction(), MainFileID); + ParseFile(PP, CreatePrintParserActionsAction(PP.getIdentifierTable()), + MainFileID); ClearSourceMgr = true; break; diff --git a/Driver/clang.h b/Driver/clang.h index bf212866ec..fd11590854 100644 --- a/Driver/clang.h +++ b/Driver/clang.h @@ -21,6 +21,7 @@ class MinimalAction; class TargetInfo; class Diagnostic; class ASTConsumer; +class IdentifierTable; /// DoPrintPreprocessedInput - Implement -E mode. void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP, @@ -28,7 +29,7 @@ void DoPrintPreprocessedInput(unsigned MainFileID, Preprocessor &PP, /// CreatePrintParserActionsAction - Return the actions implementation that /// implements the -parse-print-callbacks option. -MinimalAction *CreatePrintParserActionsAction(); +MinimalAction *CreatePrintParserActionsAction(IdentifierTable &); /// CreateTargetInfo - Return the set of target info objects as specified by /// the -arch command line option. |