[cfe-commits] r137301 - in /cfe/trunk: include/clang/Lex/LiteralSupport.h lib/Lex/LiteralSupport.cpp lib/Lex/TokenConcatenation.cpp

Craig Topper craig.topper at gmail.com
Wed Aug 10 22:10:55 PDT 2011


Author: ctopper
Date: Thu Aug 11 00:10:55 2011
New Revision: 137301

URL: http://llvm.org/viewvc/llvm-project?rev=137301&view=rev
Log:
Raw string followup. Pass a couple StringRefs by value.

Modified:
    cfe/trunk/include/clang/Lex/LiteralSupport.h
    cfe/trunk/lib/Lex/LiteralSupport.cpp
    cfe/trunk/lib/Lex/TokenConcatenation.cpp

Modified: cfe/trunk/include/clang/Lex/LiteralSupport.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/LiteralSupport.h?rev=137301&r1=137300&r2=137301&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/LiteralSupport.h (original)
+++ cfe/trunk/include/clang/Lex/LiteralSupport.h Thu Aug 11 00:10:55 2011
@@ -197,7 +197,7 @@
 
 private:
   void init(const Token *StringToks, unsigned NumStringToks);
-  void CopyStringFragment(const StringRef &Fragment);
+  void CopyStringFragment(StringRef Fragment);
 };
 
 }  // end namespace clang

Modified: cfe/trunk/lib/Lex/LiteralSupport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/LiteralSupport.cpp?rev=137301&r1=137300&r2=137301&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/LiteralSupport.cpp (original)
+++ cfe/trunk/lib/Lex/LiteralSupport.cpp Thu Aug 11 00:10:55 2011
@@ -1119,7 +1119,7 @@
 
 /// copyStringFragment - This function copies from Start to End into ResultPtr.
 /// Performs widening for multi-byte characters.
-void StringLiteralParser::CopyStringFragment(const StringRef &Fragment) {
+void StringLiteralParser::CopyStringFragment(StringRef Fragment) {
   // Copy the character span over.
   if (CharByteWidth == 1) {
     memcpy(ResultPtr, Fragment.data(), Fragment.size());

Modified: cfe/trunk/lib/Lex/TokenConcatenation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/TokenConcatenation.cpp?rev=137301&r1=137300&r2=137301&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/TokenConcatenation.cpp (original)
+++ cfe/trunk/lib/Lex/TokenConcatenation.cpp Thu Aug 11 00:10:55 2011
@@ -19,7 +19,7 @@
 
 /// IsStringPrefix - Return true if Str is a string prefix.
 /// 'L', 'u', 'U', or 'u8'. Including raw versions.
-static bool IsStringPrefix(const StringRef &Str, bool CPlusPlus0x) {
+static bool IsStringPrefix(StringRef Str, bool CPlusPlus0x) {
 
   if (Str[0] == 'L' ||
       (CPlusPlus0x && (Str[0] == 'u' || Str[0] == 'U' || Str[0] == 'R'))) {





More information about the cfe-commits mailing list