r234291 - DebugInfo: Update for LLVM change in r234290
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 6 21:14:45 PDT 2015
Author: dexonsmith
Date: Mon Apr 6 23:14:45 2015
New Revision: 234291
URL: http://llvm.org/viewvc/llvm-project?rev=234291&view=rev
Log:
DebugInfo: Update for LLVM change in r234290
The API for `DIArray` changed; use the new one.
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=234291&r1=234290&r2=234291&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Apr 6 23:14:45 2015
@@ -1039,12 +1039,12 @@ llvm::DICompositeType CGDebugInfo::getOr
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::getOr
}
// 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);
More information about the cfe-commits
mailing list