r235058 - DebugInfo: Prepare for LLVM change removing DIType::isValid()

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Apr 15 16:48:50 PDT 2015


Author: dexonsmith
Date: Wed Apr 15 18:48:50 2015
New Revision: 235058

URL: http://llvm.org/viewvc/llvm-project?rev=235058&view=rev
Log:
DebugInfo: Prepare for LLVM change removing DIType::isValid()

This is being replaced with a null check.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=235058&r1=235057&r2=235058&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Apr 15 18:48:50 2015
@@ -1400,7 +1400,7 @@ llvm::DIArray CGDebugInfo::CollectCXXTem
 
 /// 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::CreateTypeDefi
   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::CreateTypeDefi
   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();





More information about the cfe-commits mailing list