From: Benjamin Kramer Date: Sun, 25 Jul 2010 23:18:32 +0000 (+0000) Subject: Reduce string trashing. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=82d5baec32054849e760625e2413a27edfd1a9fc;p=oota-llvm.git Reduce string trashing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109386 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/InlineAsm.cpp b/lib/VMCore/InlineAsm.cpp index 0d2eca9c3de..69f713b2c42 100644 --- a/lib/VMCore/InlineAsm.cpp +++ b/lib/VMCore/InlineAsm.cpp @@ -164,7 +164,7 @@ InlineAsm::ParseConstraints(StringRef Constraints) { 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; }