diff options
author | Alp Toker <alp@nuanti.com> | 2014-06-07 23:30:53 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-06-07 23:30:53 +0000 |
commit | 6719dde6f3b5a94712a143da016ee5e214dc5f60 (patch) | |
tree | 9816d1db1f44f2998a70f2712543d43294ecb957 /lib/Sema/SemaStmtAttr.cpp | |
parent | b521d7647c33a9de7384146fe89663d63f4fbf25 (diff) |
Avoid dubious IdentifierInfo::getNameStart() uses
These cases in particular were incurring an extra strlen() when we already knew
the length. They appear to be leftovers from when the interfaces worked with C
strings that have continued to compile due to the implicit StringRef ctor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmtAttr.cpp')
-rw-r--r-- | lib/Sema/SemaStmtAttr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmtAttr.cpp b/lib/Sema/SemaStmtAttr.cpp index 1ec42ef0af..87d055bb49 100644 --- a/lib/Sema/SemaStmtAttr.cpp +++ b/lib/Sema/SemaStmtAttr.cpp @@ -62,7 +62,7 @@ static Attr *handleLoopHintAttr(Sema &S, Stmt *St, const AttributeList &A, assert(OptionInfo && "Attribute must have valid option info."); LoopHintAttr::OptionType Option = - llvm::StringSwitch<LoopHintAttr::OptionType>(OptionInfo->getNameStart()) + llvm::StringSwitch<LoopHintAttr::OptionType>(OptionInfo->getName()) .Case("vectorize", LoopHintAttr::Vectorize) .Case("vectorize_width", LoopHintAttr::VectorizeWidth) .Case("interleave", LoopHintAttr::Interleave) |