[cfe-commits] r43827 - /cfe/trunk/include/clang/AST/ASTContext.h
Steve Naroff
snaroff at apple.com
Wed Nov 7 10:07:59 PST 2007
Author: snaroff
Date: Wed Nov 7 12:07:59 2007
New Revision: 43827
URL: http://llvm.org/viewvc/llvm-project?rev=43827&view=rev
Log:
Remove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead, return false if the declarations aren't in scope. This was a hold over from when 'id' and 'Class' were initialized lazily.
Modified:
cfe/trunk/include/clang/AST/ASTContext.h
Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=43827&r1=43826&r2=43827&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Wed Nov 7 12:07:59 2007
@@ -283,11 +283,13 @@
bool interfaceTypesAreCompatible(QualType, QualType);
bool objcTypesAreCompatible(QualType, QualType);
bool isObjcIdType(QualType T) const {
- assert(IdStructType && "isObjcIdType used before 'id' type is built");
+ if (!IdStructType) // ObjC isn't enabled
+ return false;
return T->getAsStructureType() == IdStructType;
}
bool isObjcClassType(QualType T) const {
- assert(ClassStructType && "isObjcClassType used before 'Class' type is built");
+ if (!ClassStructType) // ObjC isn't enabled
+ return false;
return T->getAsStructureType() == ClassStructType;
}
bool isObjcSelType(QualType T) const {
More information about the cfe-commits
mailing list