mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0. llvm-svn: 11842
This commit is contained in:
parent
2caa729f02
commit
5b45bf1940
@ -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