[cfe-commits] r59935 - /cfe/trunk/lib/AST/ASTContext.cpp

Chris Lattner sabre at nondot.org
Sun Nov 23 19:53:00 PST 2008


Author: lattner
Date: Sun Nov 23 21:52:59 2008
New Revision: 59935

URL: http://llvm.org/viewvc/llvm-project?rev=59935&view=rev
Log:
simplify this code.

Modified:
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=59935&r1=59934&r2=59935&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sun Nov 23 21:52:59 2008
@@ -1449,7 +1449,8 @@
 // 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;
 }





More information about the cfe-commits mailing list