MachineFunction: Add llvm_unreachable for missing properties
authorMatthias Braun <matze@braunis.de>
Fri, 19 Aug 2016 23:03:28 +0000 (23:03 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 19 Aug 2016 23:03:28 +0000 (23:03 +0000)
Most compilers should give you a warning anyway though.

llvm-svn: 279346

llvm/lib/CodeGen/MachineFunction.cpp

index 2ed6517..280bfb5 100644 (file)
@@ -64,6 +64,7 @@ static const char *getPropertyName(MachineFunctionProperties::Property Prop) {
   case P::Selected: return "Selected";
   case P::TracksLiveness: return "TracksLiveness";
   }
+  llvm_unreachable("Invalid machine function property");
 }
 
 void MachineFunctionProperties::print(raw_ostream &OS) const {