r203373 - Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator==

David Blaikie dblaikie at gmail.com
Sat Mar 8 21:18:27 PST 2014


Author: dblaikie
Date: Sat Mar  8 23:18:27 2014
New Revision: 203373

URL: http://llvm.org/viewvc/llvm-project?rev=203373&view=rev
Log:
Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator==

Modified:
    cfe/trunk/lib/Lex/LiteralSupport.cpp
    cfe/trunk/lib/Sema/AttributeList.cpp

Modified: cfe/trunk/lib/Lex/LiteralSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/LiteralSupport.cpp?rev=203373&r1=203372&r2=203373&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/trunk/lib/Lex/LiteralSupport.cpp Sat Mar  8 23:18:27 2014
@@ -1373,7 +1373,7 @@ void StringLiteralParser::init(const Tok
         // result of a concatenation involving at least one user-defined-string-
         // literal, all the participating user-defined-string-literals shall
         // have the same ud-suffix.
-        if (!UDSuffixBuf.equals(UDSuffix)) {
+        if (UDSuffixBuf != UDSuffix) {
           if (Diags) {
             SourceLocation TokLoc = StringToks[i].getLocation();
             Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix)

Modified: cfe/trunk/lib/Sema/AttributeList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AttributeList.cpp?rev=203373&r1=203372&r2=203373&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AttributeList.cpp (original)
+++ cfe/trunk/lib/Sema/AttributeList.cpp Sat Mar  8 23:18:27 2014
@@ -120,7 +120,7 @@ AttributeList::Kind AttributeList::getKi
   // Normalize the attribute name, __foo__ becomes foo. This is only allowable
   // for GNU attributes.
   bool IsGNU = SyntaxUsed == AS_GNU || (SyntaxUsed == AS_CXX11 &&
-                                        FullName.equals("gnu"));
+                                        FullName == "gnu");
   if (IsGNU && AttrName.size() >= 4 && AttrName.startswith("__") &&
       AttrName.endswith("__"))
     AttrName = AttrName.slice(2, AttrName.size() - 2);





More information about the cfe-commits mailing list