[llvm] Construct SmallVector with ArrayRef (NFC) (#102799)
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index c2883d2..bcecee8e 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -292,7 +292,7 @@
static RecordRecTy *resolveRecordTypes(RecordRecTy *T1, RecordRecTy *T2) {
SmallVector<Record *, 4> CommonSuperClasses;
- SmallVector<Record *, 4> Stack(T1->classes_begin(), T1->classes_end());
+ SmallVector<Record *, 4> Stack(T1->getClasses());
while (!Stack.empty()) {
Record *R = Stack.pop_back_val();
diff --git a/llvm/lib/Transforms/IPO/ExpandVariadics.cpp b/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
index 3a1f690..49bfec2 100644
--- a/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
+++ b/llvm/lib/Transforms/IPO/ExpandVariadics.cpp
@@ -238,7 +238,7 @@
FunctionType *inlinableVariadicFunctionType(Module &M, FunctionType *FTy) {
// The type of "FTy" with the ... removed and a va_list appended
- SmallVector<Type *> ArgTypes(FTy->param_begin(), FTy->param_end());
+ SmallVector<Type *> ArgTypes(FTy->params());
ArgTypes.push_back(ABI->vaListParameterType(M));
return FunctionType::get(FTy->getReturnType(), ArgTypes,
/*IsVarArgs=*/false);
@@ -538,7 +538,7 @@
const bool FunctionIsDefinition = !F.isDeclaration();
FunctionType *FTy = F.getFunctionType();
- SmallVector<Type *> ArgTypes(FTy->param_begin(), FTy->param_end());
+ SmallVector<Type *> ArgTypes(FTy->params());
ArgTypes.push_back(ABI->vaListParameterType(M));
FunctionType *NFTy = inlinableVariadicFunctionType(M, FTy);