x64/reg_alloc: Use type alias for array returned by GetArgumentInfo()

This way if the number ever changes, we don't need to change the type in
other places.
This commit is contained in:
Lioncash
2018-08-13 11:10:34 -04:00
committed by MerryMage
parent 2188765e28
commit c41b5a3492
3 changed files with 6 additions and 4 deletions

View File

@@ -208,8 +208,8 @@ bool Argument::IsInMemory() const {
return HostLocIsSpill(*reg_alloc.ValueLocation(value.GetInst()));
}
std::array<Argument, 3> RegAlloc::GetArgumentInfo(IR::Inst* inst) {
std::array<Argument, 3> ret = { Argument{*this}, Argument{*this}, Argument{*this} };
RegAlloc::ArgumentInfo RegAlloc::GetArgumentInfo(IR::Inst* inst) {
ArgumentInfo ret = { Argument{*this}, Argument{*this}, Argument{*this} };
for (size_t i = 0; i < inst->NumArgs(); i++) {
const IR::Value& arg = inst->GetArg(i);
ret[i].value = arg;