]> granicus.if.org Git - clang/commitdiff
DebugInfo: Prepare for LLVM change removing DIType::isValid()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 15 Apr 2015 23:48:50 +0000 (23:48 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 15 Apr 2015 23:48:50 +0000 (23:48 +0000)
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

lib/CodeGen/CGDebugInfo.cpp

index ed47fcad87d180b2db62bb99b53ec882efbd2a28..b4d55476c70ed9fcf673b80dfe8235f959b5419d 100644 (file)
@@ -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();