Skip to content

Commit 94e6786

Browse files
[llvm] Construct SmallVector with ArrayRef (NFC) (#102799)
1 parent 5286656 commit 94e6786

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/TableGen/Record.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ bool RecordRecTy::typeIsA(const RecTy *RHS) const {
292292

293293
static RecordRecTy *resolveRecordTypes(RecordRecTy *T1, RecordRecTy *T2) {
294294
SmallVector<Record *, 4> CommonSuperClasses;
295-
SmallVector<Record *, 4> Stack(T1->classes_begin(), T1->classes_end());
295+
SmallVector<Record *, 4> Stack(T1->getClasses());
296296

297297
while (!Stack.empty()) {
298298
Record *R = Stack.pop_back_val();

llvm/lib/Transforms/IPO/ExpandVariadics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class ExpandVariadics : public ModulePass {
238238

239239
FunctionType *inlinableVariadicFunctionType(Module &M, FunctionType *FTy) {
240240
// The type of "FTy" with the ... removed and a va_list appended
241-
SmallVector<Type *> ArgTypes(FTy->param_begin(), FTy->param_end());
241+
SmallVector<Type *> ArgTypes(FTy->params());
242242
ArgTypes.push_back(ABI->vaListParameterType(M));
243243
return FunctionType::get(FTy->getReturnType(), ArgTypes,
244244
/*IsVarArgs=*/false);
@@ -538,7 +538,7 @@ ExpandVariadics::deriveFixedArityReplacement(Module &M, IRBuilder<> &Builder,
538538
const bool FunctionIsDefinition = !F.isDeclaration();
539539

540540
FunctionType *FTy = F.getFunctionType();
541-
SmallVector<Type *> ArgTypes(FTy->param_begin(), FTy->param_end());
541+
SmallVector<Type *> ArgTypes(FTy->params());
542542
ArgTypes.push_back(ABI->vaListParameterType(M));
543543

544544
FunctionType *NFTy = inlinableVariadicFunctionType(M, FTy);

0 commit comments

Comments
 (0)