mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
CodeGen: Add constexpr to Register constructors
This commit is contained in:
parent
2e64fe9bf7
commit
d824eb8a0e
@ -20,8 +20,8 @@ class Register {
|
||||
unsigned Reg;
|
||||
|
||||
public:
|
||||
Register(unsigned Val = 0): Reg(Val) {}
|
||||
Register(MCRegister Val): Reg(Val) {}
|
||||
constexpr Register(unsigned Val = 0): Reg(Val) {}
|
||||
constexpr Register(MCRegister Val): Reg(Val) {}
|
||||
|
||||
// Register numbers can represent physical registers, virtual registers, and
|
||||
// sometimes stack slots. The unsigned values are divided into these ranges:
|
||||
@ -102,7 +102,7 @@ public:
|
||||
return virtReg2Index(Reg);
|
||||
}
|
||||
|
||||
operator unsigned() const {
|
||||
constexpr operator unsigned() const {
|
||||
return Reg;
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class MCRegister {
|
||||
unsigned Reg;
|
||||
|
||||
public:
|
||||
MCRegister(unsigned Val = 0): Reg(Val) {}
|
||||
constexpr MCRegister(unsigned Val = 0): Reg(Val) {}
|
||||
|
||||
// Register numbers can represent physical registers, virtual registers, and
|
||||
// sometimes stack slots. The unsigned values are divided into these ranges:
|
||||
@ -60,7 +60,7 @@ public:
|
||||
return isPhysicalRegister(Reg);
|
||||
}
|
||||
|
||||
operator unsigned() const {
|
||||
constexpr operator unsigned() const {
|
||||
return Reg;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user