diff options
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index af922c0698..e47735e627 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -690,7 +690,7 @@ Preprocessor::getModuleHeaderToIncludeForDiagnostics(SourceLocation IncLoc, // If we have a module import syntax, we shouldn't include a header to // make a particular module visible. - if (getLangOpts().ObjC2) + if (getLangOpts().ObjC) return nullptr; Module *TopM = M->getTopLevelModule(); @@ -1629,7 +1629,7 @@ static void diagnoseAutoModuleImport( Preprocessor &PP, SourceLocation HashLoc, Token &IncludeTok, ArrayRef<std::pair<IdentifierInfo *, SourceLocation>> Path, SourceLocation PathEnd) { - assert(PP.getLangOpts().ObjC2 && "no import syntax available"); + assert(PP.getLangOpts().ObjC && "no import syntax available"); SmallString<128> PathString; for (size_t I = 0, N = Path.size(); I != N; ++I) { @@ -1978,7 +1978,7 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc, // Warn that we're replacing the include/import with a module import. // We only do this in Objective-C, where we have a module-import syntax. - if (getLangOpts().ObjC2) + if (getLangOpts().ObjC) diagnoseAutoModuleImport(*this, HashLoc, IncludeTok, Path, CharEnd); // Load the module to import its macros. We'll make the declarations @@ -2215,7 +2215,7 @@ void Preprocessor::HandleMicrosoftImportDirective(Token &Tok) { /// void Preprocessor::HandleImportDirective(SourceLocation HashLoc, Token &ImportTok) { - if (!LangOpts.ObjC1) { // #import is standard for ObjC. + if (!LangOpts.ObjC) { // #import is standard for ObjC. if (LangOpts.MSVCCompat) return HandleMicrosoftImportDirective(ImportTok); Diag(ImportTok, diag::ext_pp_import_directive); @@ -2686,7 +2686,7 @@ void Preprocessor::HandleDefineDirective( II->isStr("__unsafe_unretained") || II->isStr("__autoreleasing"); }; - if (getLangOpts().ObjC1 && + if (getLangOpts().ObjC && SourceMgr.getFileID(OtherMI->getDefinitionLoc()) == getPredefinesFileID() && isObjCProtectedMacro(MacroNameTok.getIdentifierInfo())) { |