[llvm-commits] [llvm] r109386 - /llvm/trunk/lib/VMCore/InlineAsm.cpp

Benjamin Kramer benny.kra at googlemail.com
Sun Jul 25 16:18:32 PDT 2010


Author: d0k
Date: Sun Jul 25 18:18:32 2010
New Revision: 109386

URL: http://llvm.org/viewvc/llvm-project?rev=109386&view=rev
Log:
Reduce string trashing.

Modified:
    llvm/trunk/lib/VMCore/InlineAsm.cpp

Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/InlineAsm.cpp?rev=109386&r1=109385&r2=109386&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/InlineAsm.cpp (original)
+++ llvm/trunk/lib/VMCore/InlineAsm.cpp Sun Jul 25 18:18:32 2010
@@ -164,7 +164,7 @@
     StringRef::iterator ConstraintEnd = std::find(I, E, ',');
 
     if (ConstraintEnd == I ||  // Empty constraint like ",,"
-        Info.Parse(std::string(I, ConstraintEnd), Result)) {
+        Info.Parse(StringRef(I, ConstraintEnd-I), Result)) {
       Result.clear();          // Erroneous constraint?
       break;
     }





More information about the llvm-commits mailing list