Commit 0a352329 authored by Mircea Trofin's avatar Mircea Trofin
Browse files

[MC] Assert that MCRegUnitIterator operates over MCRegisters

The signature of the ctor expects a MCRegister, but currently any
unsigned value can be converted to a MCRegister.

This patch checks that indeed the provided value is a physical register
only. We want to eventually stop implicitly converting unsigned or
Register to MCRegister (which is incorrect). The next step after this
patch is changing uses of MCRegUnitIterator to explicitly cast Register
or unsigned values to MCRegister. To that end, this patch also
introduces 2 APIs that make that conversion checked and explicit.

Differential Revision: https://reviews.llvm.org/D88705
parent 508ac0ec
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment