]> granicus.if.org Git - clang/commitdiff
DebugInfo: Update for LLVM change in r234290
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 04:14:45 +0000 (04:14 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 7 Apr 2015 04:14:45 +0000 (04:14 +0000)
The API for `DIArray` changed; use the new one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234291 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index c5cd9abbed2d4e1e88dd11c2378e00f4db4a7c17..96ca886c64c152a0747b0cceac2d017e969dc5a7 100644 (file)
@@ -1039,12 +1039,12 @@ llvm::DICompositeType CGDebugInfo::getOrCreateInstanceMethodType(
   llvm::DITypeArray Args(
       cast<llvm::MDSubroutineType>(getOrCreateType(QualType(Func, 0), Unit))
           ->getTypeArray());
-  assert(Args.getNumElements() && "Invalid number of arguments!");
+  assert(Args.size() && "Invalid number of arguments!");
 
   SmallVector<llvm::Metadata *, 16> Elts;
 
   // First element is always return type. For 'void' functions it is NULL.
-  Elts.push_back(Args.getElement(0));
+  Elts.push_back(Args[0]);
 
   // "this" pointer is always first argument.
   const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();
@@ -1072,8 +1072,8 @@ llvm::DICompositeType CGDebugInfo::getOrCreateInstanceMethodType(
   }
 
   // Copy rest of the arguments.
-  for (unsigned i = 1, e = Args.getNumElements(); i != e; ++i)
-    Elts.push_back(Args.getElement(i));
+  for (unsigned i = 1, e = Args.size(); i != e; ++i)
+    Elts.push_back(Args[i]);
 
   llvm::DITypeArray EltTypeArray = DBuilder.getOrCreateTypeArray(Elts);