File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -270,16 +270,16 @@ void Constant::dump() const {
270
270
void Function::dumpNameAndArgs (raw_ostream &OS) const {
271
271
auto *F = cast<llvm::Function>(Val);
272
272
OS << *F->getReturnType () << " @" << F->getName () << " (" ;
273
- auto NumArgs = F-> arg_size ();
274
- for ( auto [Idx, Arg] : enumerate( F->args ())) {
275
- auto *SBArg = cast_or_null<Argument>(Ctx. getValue (&Arg));
276
- if ( SBArg == nullptr )
277
- OS << " NULL " ;
278
- else
279
- SBArg-> printAsOperand (OS);
280
- if (Idx + 1 < NumArgs)
281
- OS << " , " ;
282
- }
273
+ interleave (
274
+ F->args (),
275
+ [ this , &OS]( const llvm::Argument &LLVMArg) {
276
+ auto * SBArg = cast_or_null<Argument>(Ctx. getValue (&LLVMArg));
277
+ if (SBArg == nullptr )
278
+ OS << " NULL " ;
279
+ else
280
+ SBArg-> printAsOperand (OS);
281
+ },
282
+ [ this , &OS] { OS << " , " ; });
283
283
OS << " )" ;
284
284
}
285
285
void Function::dump (raw_ostream &OS) const {
You can’t perform that action at this time.
0 commit comments