mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11842 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d8b28a357
commit
338ce3d64e
@ -141,12 +141,14 @@ public:
|
||||
/// isPhysicalRegister - Return true if the specified register number is in
|
||||
/// the physical register namespace.
|
||||
static bool isPhysicalRegister(unsigned Reg) {
|
||||
assert(Reg && "this is not a register!";
|
||||
return Reg < FirstVirtualRegister;
|
||||
}
|
||||
|
||||
/// isVirtualRegister - Return true if the specified register number is in
|
||||
/// the virtual register namespace.
|
||||
static bool isVirtualRegister(unsigned Reg) {
|
||||
assert(Reg && "this is not a register!";
|
||||
return Reg >= FirstVirtualRegister;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user