From: Duncan P. N. Exon Smith Date: Wed, 15 Apr 2015 23:48:50 +0000 (+0000) Subject: DebugInfo: Prepare for LLVM change removing DIType::isValid() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c64fc4415be9203cbe6173082fb8819704c63c70;p=clang DebugInfo: Prepare for LLVM change removing DIType::isValid() This is being replaced with a null check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235058 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index ed47fcad87..b4d55476c7 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1400,7 +1400,7 @@ llvm::DIArray CGDebugInfo::CollectCXXTemplateParams( /// getOrCreateVTablePtrType - Return debug info descriptor for vtable. llvm::DIType CGDebugInfo::getOrCreateVTablePtrType(llvm::DIFile Unit) { - if (VTablePtrType.isValid()) + if (VTablePtrType) return VTablePtrType; ASTContext &Context = CGM.getContext(); @@ -1717,7 +1717,7 @@ llvm::DIType CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty, if (SClass) { llvm::DIType SClassTy = getOrCreateType(CGM.getContext().getObjCInterfaceType(SClass), Unit); - if (!SClassTy.isValid()) + if (!SClassTy) return llvm::DIType(); llvm::DIType InhTag = DBuilder.createInheritance(RealDecl, SClassTy, 0, 0); @@ -1746,7 +1746,7 @@ llvm::DIType CGDebugInfo::CreateTypeDefinition(const ObjCInterfaceType *Ty, for (ObjCIvarDecl *Field = ID->all_declared_ivar_begin(); Field; Field = Field->getNextIvar(), ++FieldNo) { llvm::DIType FieldTy = getOrCreateType(Field->getType(), Unit); - if (!FieldTy.isValid()) + if (!FieldTy) return llvm::DIType(); StringRef FieldName = Field->getName();