]> granicus.if.org Git - clang/commitdiff
simplify this code.
authorChris Lattner <sabre@nondot.org>
Mon, 24 Nov 2008 03:52:59 +0000 (03:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 24 Nov 2008 03:52:59 +0000 (03:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59935 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index 61e8c99aa40a2754666e4e4e824c52c9719e770e..b87b1f4f2e539668d55c11194a6bbb3e822cde55 100644 (file)
@@ -1449,7 +1449,8 @@ QualType ASTContext::getObjCFastEnumerationStateType()
 // typedef <type> BOOL;
 static bool isTypeTypedefedAsBOOL(QualType T) {
   if (const TypedefType *TT = dyn_cast<TypedefType>(T))
-    return !strcmp(TT->getDecl()->getIdentifierName(), "BOOL");
+    if (IdentifierInfo *II = TT->getDecl()->getIdentifier())
+      return II->isStr("BOOL");
         
   return false;
 }