summaryrefslogtreecommitdiffstats
path: root/clang/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
commit68e486804fc5cd636730090f454e642954a22083 (patch)
tree5ffc2b9bf6f6b25dee120a59a9c076438a9381ff /clang/lib/Parse/ParseObjc.cpp
parente42592e33afcef2d9603e87f93175104534787c7 (diff)
downloadbcm5719-llvm-68e486804fc5cd636730090f454e642954a22083.tar.gz
bcm5719-llvm-68e486804fc5cd636730090f454e642954a22083.zip
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. llvm-svn: 59706
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 9c97ea2efa6..ea92e880f78 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/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))
OpenPOWER on IntegriCloud