aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-20 04:42:34 +0000
committerChris Lattner <sabre@nondot.org>2008-11-20 04:42:34 +0000
commit92e62b02226410bcad8584541b8f1ff4d35ebab9 (patch)
treeaff14a293c5b7307ead4c35ae21ff1c6e940196e /lib/Parse/ParseObjc.cpp
parenta751217e769cbe73df2d579a28153f1c947aef10 (diff)
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in, and use this to avoid having to call strlen on it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 9c97ea2efa..ea92e880f7 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -387,19 +387,19 @@ void Parser::ParseObjCPropertyAttribute(ObjCDeclSpec &DS) {
SourceLocation AttrName = ConsumeToken(); // consume last attribute name
- if (II->isName("readonly"))
+ if (II->isStr("readonly"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readonly);
- else if (II->isName("assign"))
+ else if (II->isStr("assign"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_assign);
- else if (II->isName("readwrite"))
+ else if (II->isStr("readwrite"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_readwrite);
- else if (II->isName("retain"))
+ else if (II->isStr("retain"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_retain);
- else if (II->isName("copy"))
+ else if (II->isStr("copy"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_copy);
- else if (II->isName("nonatomic"))
+ else if (II->isStr("nonatomic"))
DS.setPropertyAttributes(ObjCDeclSpec::DQ_PR_nonatomic);
- else if (II->isName("getter") || II->isName("setter")) {
+ else if (II->isStr("getter") || II->isStr("setter")) {
// getter/setter require extra treatment.
if (ExpectAndConsume(tok::equal, diag::err_objc_expected_equal, "",
tok::r_paren))