"One" line fix for -parse-noop failure, "id" and several other things
were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58498 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/PrintParserCallbacks.cpp b/Driver/PrintParserCallbacks.cpp
index 94cc0e2..43dbf34 100644
--- a/Driver/PrintParserCallbacks.cpp
+++ b/Driver/PrintParserCallbacks.cpp
@@ -22,7 +22,7 @@
class ParserPrintActions : public MinimalAction {
public:
- ParserPrintActions(IdentifierTable &IT) : MinimalAction(IT) {}
+ ParserPrintActions(Preprocessor &PP) : MinimalAction(PP) {}
// Printing Functions which also must call MinimalAction
@@ -568,6 +568,6 @@
};
}
-MinimalAction *clang::CreatePrintParserActionsAction(IdentifierTable &IT) {
- return new ParserPrintActions(IT);
+MinimalAction *clang::CreatePrintParserActionsAction(Preprocessor &PP) {
+ return new ParserPrintActions(PP);
}
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 84eb341..cf19c66 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1304,12 +1304,12 @@
break;
case ParseNoop: // -parse-noop
- ParseFile(PP, new MinimalAction(PP.getIdentifierTable()));
+ ParseFile(PP, new MinimalAction(PP));
ClearSourceMgr = true;
break;
case ParsePrintCallbacks:
- ParseFile(PP, CreatePrintParserActionsAction(PP.getIdentifierTable()));
+ ParseFile(PP, CreatePrintParserActionsAction(PP));
ClearSourceMgr = true;
break;
diff --git a/Driver/clang.h b/Driver/clang.h
index 46c0085..e0ddd08 100644
--- a/Driver/clang.h
+++ b/Driver/clang.h
@@ -39,7 +39,7 @@
/// CreatePrintParserActionsAction - Return the actions implementation that
/// implements the -parse-print-callbacks option.
-MinimalAction *CreatePrintParserActionsAction(IdentifierTable &);
+MinimalAction *CreatePrintParserActionsAction(Preprocessor &PP);
/// EmitLLVMFromASTs - Implement -emit-llvm, which generates llvm IR from C.
void EmitLLVMFromASTs(Preprocessor &PP, bool PrintStats);