r194629 - [objcmt] If no objcmt options were specified, default to enable literals+subscripting.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Nov 13 15:38:22 PST 2013
Author: akirtzidis
Date: Wed Nov 13 17:38:22 2013
New Revision: 194629
URL: http://llvm.org/viewvc/llvm-project?rev=194629&view=rev
Log:
[objcmt] If no objcmt options were specified, default to enable literals+subscripting.
Modified:
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=194629&r1=194628&r2=194629&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Wed Nov 13 17:38:22 2013
@@ -1709,9 +1709,16 @@ ASTConsumer *MigrateSourceAction::Create
StringRef InFile) {
PPConditionalDirectiveRecord *
PPRec = new PPConditionalDirectiveRecord(CI.getSourceManager());
+ unsigned ObjCMTAction = CI.getFrontendOpts().ObjCMTAction;
+ if (ObjCMTAction == FrontendOptions::ObjCMT_None) {
+ // If no specific option was given, enable literals+subscripting transforms
+ // by default.
+ ObjCMTAction = FrontendOptions::ObjCMT_Literals |
+ FrontendOptions::ObjCMT_Subscripting;
+ }
CI.getPreprocessor().addPPCallbacks(PPRec);
return new ObjCMigrateASTConsumer(CI.getFrontendOpts().OutputFile,
- CI.getFrontendOpts().ObjCMTAction,
+ ObjCMTAction,
Remapper,
CI.getFileManager(),
PPRec,
More information about the cfe-commits
mailing list