forked from OSchip/llvm-project
AttributeList: tweak the conditional order to avoid two strcmps
llvm-svn: 196518
This commit is contained in:
parent
5a22df498e
commit
a31d1dd179
|
@ -122,8 +122,8 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name,
|
|||
StringRef AttrName = Name->getName();
|
||||
|
||||
// Normalize the attribute name, __foo__ becomes foo.
|
||||
if (AttrName.startswith("__") && AttrName.endswith("__") &&
|
||||
AttrName.size() >= 4)
|
||||
if (AttrName.size() >= 4 && AttrName.startswith("__") &&
|
||||
AttrName.endswith("__"))
|
||||
AttrName = AttrName.substr(2, AttrName.size() - 4);
|
||||
|
||||
SmallString<64> Buf;
|
||||
|
|
Loading…
Reference in New Issue