From: Chris Lattner Date: Mon, 24 Nov 2008 03:52:59 +0000 (+0000) Subject: simplify this code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb49c3ee5d270485f4b273691fd14bc97403fa5d;p=clang simplify this code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59935 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 61e8c99aa4..b87b1f4f2e 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1449,7 +1449,8 @@ QualType ASTContext::getObjCFastEnumerationStateType() // typedef BOOL; static bool isTypeTypedefedAsBOOL(QualType T) { if (const TypedefType *TT = dyn_cast(T)) - return !strcmp(TT->getDecl()->getIdentifierName(), "BOOL"); + if (IdentifierInfo *II = TT->getDecl()->getIdentifier()) + return II->isStr("BOOL"); return false; }