+ /* Set up function's arguments. */
+ argc = cfi.ctc_argc;
+ type->set_num_fields (argc);
+ if ((cfi.ctc_flags & CTF_FUNC_VARARG) != 0)
+ type->set_has_varargs (true);
+
+ if (argc != 0)
+ {
+ std::vector<ctf_id_t> argv (argc);
+ if (ctf_func_type_args (fp, tid, argc, argv.data ()) == CTF_ERR)
+ return nullptr;
+
+ type->set_fields
+ ((struct field *) TYPE_ZALLOC (type, argc * sizeof (struct field)));
+ struct type *void_type = objfile_type (of)->builtin_void;
+ /* If failed to find the argument type, fill it with void_type. */
+ for (int iparam = 0; iparam < argc; iparam++)
+ {
+ atype = get_tid_type (of, argv[iparam]);
+ if (atype != nullptr)
+ type->field (iparam).set_type (atype);
+ else
+ type->field (iparam).set_type (void_type);
+ }
+ }
+