[llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h
Alkis Evlogimenos
alkis at niobe.cs.uiuc.edu
Wed Feb 25 16:05:01 PST 2004
Changes in directory llvm/include/llvm/Target:
MRegisterInfo.h updated: 1.35 -> 1.36
---
Log message:
Add assert to isPhysicalRegister and isVirtualRegister to fail when
passed the special 'register' 0.
---
Diffs of the changes: (+2 -0)
Index: llvm/include/llvm/Target/MRegisterInfo.h
diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.35 llvm/include/llvm/Target/MRegisterInfo.h:1.36
--- llvm/include/llvm/Target/MRegisterInfo.h:1.35 Wed Feb 25 15:55:45 2004
+++ llvm/include/llvm/Target/MRegisterInfo.h Wed Feb 25 16:04:28 2004
@@ -141,12 +141,14 @@
/// 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;
}
More information about the llvm-commits
mailing list