diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-03-11 07:00:24 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-03-11 07:00:24 +0000 |
commit | 4e4d08403ca5cfd4d558fa2936215d3a4e5a528d (patch) | |
tree | bc9bf6ce1639dc8a7ba02d0e3046ab14b5329d8c /lib/ARCMigrate/Transforms.cpp | |
parent | 7c02cfeb0861278c09ba05d1b92bd2a996bbe2e0 (diff) |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate/Transforms.cpp')
-rw-r--r-- | lib/ARCMigrate/Transforms.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ARCMigrate/Transforms.cpp b/lib/ARCMigrate/Transforms.cpp index 45a8c989ef..c0adf16a11 100644 --- a/lib/ARCMigrate/Transforms.cpp +++ b/lib/ARCMigrate/Transforms.cpp @@ -67,7 +67,7 @@ static bool isClassInWeakBlacklist(ObjCInterfaceDecl *cls) { bool trans::canApplyWeak(ASTContext &Ctx, QualType type, bool AllowOnUnknownClass) { - if (!Ctx.getLangOptions().ObjCRuntimeHasWeak) + if (!Ctx.getLangOpts().ObjCRuntimeHasWeak) return false; QualType T = type; @@ -111,10 +111,10 @@ SourceLocation trans::findSemiAfterLocation(SourceLocation loc, ASTContext &Ctx) { SourceManager &SM = Ctx.getSourceManager(); if (loc.isMacroID()) { - if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOptions(), &loc)) + if (!Lexer::isAtEndOfMacroExpansion(loc, SM, Ctx.getLangOpts(), &loc)) return SourceLocation(); } - loc = Lexer::getLocForEndOfToken(loc, /*Offset=*/0, SM, Ctx.getLangOptions()); + loc = Lexer::getLocForEndOfToken(loc, /*Offset=*/0, SM, Ctx.getLangOpts()); // Break down the source location. std::pair<FileID, unsigned> locInfo = SM.getDecomposedLoc(loc); @@ -129,7 +129,7 @@ SourceLocation trans::findSemiAfterLocation(SourceLocation loc, // Lex from the start of the given location. Lexer lexer(SM.getLocForStartOfFile(locInfo.first), - Ctx.getLangOptions(), + Ctx.getLangOpts(), file.begin(), tokenBegin, file.end()); Token tok; lexer.LexFromRawLexer(tok); @@ -375,7 +375,7 @@ bool MigrationContext::rewritePropertyAttribute(StringRef fromAttr, // Lex from the start of the given location. Lexer lexer(SM.getLocForStartOfFile(locInfo.first), - Pass.Ctx.getLangOptions(), + Pass.Ctx.getLangOpts(), file.begin(), tokenBegin, file.end()); Token tok; lexer.LexFromRawLexer(tok); @@ -458,7 +458,7 @@ bool MigrationContext::addPropertyAttribute(StringRef attr, // Lex from the start of the given location. Lexer lexer(SM.getLocForStartOfFile(locInfo.first), - Pass.Ctx.getLangOptions(), + Pass.Ctx.getLangOpts(), file.begin(), tokenBegin, file.end()); Token tok; lexer.LexFromRawLexer(tok); @@ -520,7 +520,7 @@ static void GCRewriteFinalize(MigrationPass &pass) { "#if !__has_feature(objc_arc)\n"); CharSourceRange::getTokenRange(FinalizeM->getSourceRange()); const SourceManager &SM = pass.Ctx.getSourceManager(); - const LangOptions &LangOpts = pass.Ctx.getLangOptions(); + const LangOptions &LangOpts = pass.Ctx.getLangOpts(); bool Invalid; std::string str = "\n#endif\n"; str += Lexer::getSourceText( |