Apparently storing the pointer to a StringLiteral as
a StringRef caused this section of code to issue a ubsan
warning. This will hopefully fix that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324687
91177308-0d34-0410-b5e6-
96231b3b80d8
};
bool PPCTargetInfo::isValidCPUName(StringRef Name) const {
- const StringRef *FoundName = llvm::find(ValidCPUNames, Name);
- return FoundName != std::end(ValidCPUNames);
+ return llvm::find(ValidCPUNames, Name) != std::end(ValidCPUNames);
}
void PPCTargetInfo::fillValidCPUList(SmallVectorImpl<StringRef> &Values) const {