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 | 68e486804fc5cd636730090f454e642954a22083 (patch) | |
| tree | 5ffc2b9bf6f6b25dee120a59a9c076438a9381ff /clang/lib/AST | |
| parent | e42592e33afcef2d9603e87f93175104534787c7 (diff) | |
| download | bcm5719-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/AST')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 061402076e5..e9d5eb75ea4 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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) { |

