diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-20 04:42:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-20 04:42:34 +0000 |
commit | 92e62b02226410bcad8584541b8f1ff4d35ebab9 (patch) | |
tree | aff14a293c5b7307ead4c35ae21ff1c6e940196e /lib/AST/Expr.cpp | |
parent | a751217e769cbe73df2d579a28153f1c947aef10 (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/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 061402076e..e9d5eb75ea 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -1165,10 +1165,10 @@ bool ExtVectorElementExpr::containsDuplicateElements() const { /// getEncodedElementAccess - We encode the fields as a llvm ConstantArray. void ExtVectorElementExpr::getEncodedElementAccess( llvm::SmallVectorImpl<unsigned> &Elts) const { - bool isHi = Accessor.isName("hi"); - bool isLo = Accessor.isName("lo"); - bool isEven = Accessor.isName("e"); - bool isOdd = Accessor.isName("o"); + bool isHi = Accessor.isStr("hi"); + bool isLo = Accessor.isStr("lo"); + bool isEven = Accessor.isStr("e"); + bool isOdd = Accessor.isStr("o"); const char *compStr = Accessor.getName(); for (unsigned i = 0, e = getNumElements(); i != e; ++i) { |