[cfe-commits] r59606 - /cfe/trunk/lib/Parse/ParseObjc.cpp
Chris Lattner
sabre at nondot.org
Tue Nov 18 23:49:38 PST 2008
Author: lattner
Date: Wed Nov 19 01:49:38 2008
New Revision: 59606
URL: http://llvm.org/viewvc/llvm-project?rev=59606&view=rev
Log:
remove some uses of IdentifierInfo::getName()
Modified:
cfe/trunk/lib/Parse/ParseObjc.cpp
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=59606&r1=59605&r2=59606&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Wed Nov 19 01:49:38 2008
@@ -387,20 +387,19 @@
SourceLocation AttrName = ConsumeToken(); // consume last attribute name
- if (!strcmp(II->getName(), "readonly"))
+ if (II->isName("readonly"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readonly);
- else if (!strcmp(II->getName(), "assign"))
+ else if (II->isName("assign"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_assign);
- else if (!strcmp(II->getName(), "readwrite"))
+ else if (II->isName("readwrite"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readwrite);
- else if (!strcmp(II->getName(), "retain"))
+ else if (II->isName("retain"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_retain);
- else if (!strcmp(II->getName(), "copy"))
+ else if (II->isName("copy"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_copy);
- else if (!strcmp(II->getName(), "nonatomic"))
+ else if (II->isName("nonatomic"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_nonatomic);
- else if (!strcmp(II->getName(), "getter") ||
- !strcmp(II->getName(), "setter")) {
+ else if (II->isName("getter") || II->isName("setter")) {
// getter/setter require extra treatment.
if (ExpectAndConsume(tok::equal, diag::err_objc_expected_equal, "",
tok::r_paren))
@@ -426,7 +425,7 @@
ConsumeToken(); // consume method name
}
} else {
- Diag(AttrName, diag::err_objc_expected_property_attr) << II->getName();
+ Diag(AttrName, diag::err_objc_expected_property_attr) << II;
SkipUntil(tok::r_paren);
return;
}
More information about the cfe-commits
mailing list