diff options
author | Matthias Braun <matze@braunis.de> | 2016-08-19 22:31:42 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-08-19 22:31:42 +0000 |
commit | a3b983aa5ed22e3e026f70f9a2c58f19ff334528 (patch) | |
tree | 66743d1d27154075f40910d75333c329ddf417e5 | |
parent | 9b818ac5d9a617dc2485ca3ed83b08f46d30824b (diff) | |
download | bcm5719-llvm-a3b983aa5ed22e3e026f70f9a2c58f19ff334528.tar.gz bcm5719-llvm-a3b983aa5ed22e3e026f70f9a2c58f19ff334528.zip |
MachineFunction: Make LastProperty an alias of the last property
This avoids unnecessary cases in switch statements covering all
properties.
llvm-svn: 279337
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineFunction.h | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h index b34978550f1..e0c7dd24423 100644 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ b/llvm/include/llvm/CodeGen/MachineFunction.h @@ -127,7 +127,7 @@ public: Legalized, RegBankSelected, Selected, - LastProperty, + LastProperty = Selected, }; bool hasProperty(Property P) const { @@ -161,7 +161,7 @@ public: private: BitVector Properties = - BitVector(static_cast<unsigned>(Property::LastProperty)); + BitVector(static_cast<unsigned>(Property::LastProperty)+1); }; class MachineFunction { diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index c84faafaa48..4cdb6c890a5 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -85,8 +85,6 @@ void MachineFunctionProperties::print(raw_ostream &ROS, bool OnlySet) const { case Property::Selected: ROS << (HasProperty ? "" : "not ") << "selected"; break; - default: - break; } } #endif |