case BuiltinType::Void:
return llvm::DIType();
case BuiltinType::ObjCClass:
- if (ClassTy.isType())
+ if (ClassTy)
return ClassTy;
ClassTy = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
"objc_class", TheCU,
// Class isa;
// } *id;
- if (ObjTy.isCompositeType())
+ if (ObjTy)
return ObjTy;
- if (!ClassTy.isType())
+ if (!ClassTy)
ClassTy = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
"objc_class", TheCU,
getOrCreateMainFile(), 0);
return ObjTy;
}
case BuiltinType::ObjCSel: {
- if (SelTy.isType())
+ if (SelTy)
return SelTy;
SelTy =
DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
llvm::DIType CGDebugInfo::getOrCreateStructPtrType(StringRef Name,
llvm::DIType &Cache) {
- if (Cache.isType())
+ if (Cache)
return Cache;
Cache = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type, Name,
TheCU, getOrCreateMainFile(), 0);
llvm::DIType CGDebugInfo::CreateType(const BlockPointerType *Ty,
llvm::DIFile Unit) {
- if (BlockLiteralGeneric.isType())
+ if (BlockLiteralGeneric)
return BlockLiteralGeneric;
SmallVector<llvm::Value *, 8> EltTys;
// typedef, make sure to emit the whole chain.
llvm::DIType Src =
getOrCreateType(Ty->getDecl()->getUnderlyingType(), Unit, Declaration);
- if (!Src.isType())
+ if (!Src)
return llvm::DIType();
// We don't set size information, but do specify where the typedef was
// declared.
QualType QTy = CGM.getContext().getRecordType(&RD);
llvm::DIType T = getTypeOrNull(QTy);
- if (T.isType() && T.isForwardDecl())
+ if (T && T.isForwardDecl())
getOrCreateType(QTy, getOrCreateFile(RD.getLocation()));
}
llvm::DIType T = getCompletedTypeOrNull(Ty);
- if (T.isType()) {
+ if (T) {
// If we're looking for a definition, make sure we have definitions of any
// underlying types.
if (const TypedefType* TTy = dyn_cast<TypedefType>(Ty))
TypeCache[TyPtr] = Res;
llvm::DIType TC = getTypeOrNull(Ty);
- if (TC.isType() && TC.isForwardDecl())
+ if (TC && TC.isForwardDecl())
ReplaceMap.push_back(std::make_pair(TyPtr, static_cast<llvm::Value*>(TC)));
else if (ObjCInterfaceDecl* Decl = getObjCInterfaceDecl(Ty)) {
// Interface types may have elements added to them by a
// We may have cached a forward decl when we could have created
// a non-forward decl. Go ahead and create a non-forward decl
// now.
- if (T.isType() && !T.isForwardDecl()) return T;
+ if (T && !T.isForwardDecl()) return T;
// Otherwise create the type.
llvm::DIType Res = CreateLimitedTypeNode(Ty, Unit);
- if (T.isType() && T.isForwardDecl())
+ if (T && T.isForwardDecl())
ReplaceMap.push_back(std::make_pair(Ty.getAsOpaquePtr(),
static_cast<llvm::Value*>(T)));
llvm::DIType CGDebugInfo::CreateSelfType(const QualType &QualTy,
llvm::DIType Ty) {
llvm::DIType CachedTy = getTypeOrNull(QualTy);
- if (CachedTy.isType()) Ty = CachedTy;
+ if (CachedTy) Ty = CachedTy;
else DEBUG(llvm::dbgs() << "No cached type for self.");
return DBuilder.createObjectPointerType(Ty);
}
RepTy = llvm::DIType(cast<llvm::MDNode>(V));
}
- if (Ty.isType() && Ty.isForwardDecl() && RepTy.isType())
+ if (Ty && Ty.isForwardDecl() && RepTy)
Ty.replaceAllUsesWith(RepTy);
}