[PowerPC] Change PPCTargetInfo::hasFeature() to use StringSwitch
Implement post-commit comment on r220989 from Eric Christopher. llvm-svn: 221099
This commit is contained in:
parent
778fcc770b
commit
e6e9d15d5f
|
@ -1136,9 +1136,11 @@ void PPCTargetInfo::getDefaultFeatures(llvm::StringMap<bool> &Features) const {
|
|||
}
|
||||
|
||||
bool PPCTargetInfo::hasFeature(StringRef Feature) const {
|
||||
return (Feature == "powerpc" ||
|
||||
(Feature == "vsx" && HasVSX) ||
|
||||
(Feature == "power8-vector" && HasP8Vector));
|
||||
return llvm::StringSwitch<bool>(Feature)
|
||||
.Case("powerpc", true)
|
||||
.Case("vsx", HasVSX)
|
||||
.Case("power8-vector", HasP8Vector)
|
||||
.Default(false);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue