From: Duncan P. N. Exon Smith Date: Tue, 7 Apr 2015 04:14:45 +0000 (+0000) Subject: DebugInfo: Update for LLVM change in r234290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0d698fc614970042b126d603057b39cab7c657f;p=clang DebugInfo: Update for LLVM change in r234290 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 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index c5cd9abbed..96ca886c64 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1039,12 +1039,12 @@ llvm::DICompositeType CGDebugInfo::getOrCreateInstanceMethodType( llvm::DITypeArray Args( cast(getOrCreateType(QualType(Func, 0), Unit)) ->getTypeArray()); - assert(Args.getNumElements() && "Invalid number of arguments!"); + assert(Args.size() && "Invalid number of arguments!"); SmallVector 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);