From 82d5baec32054849e760625e2413a27edfd1a9fc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 25 Jul 2010 23:18:32 +0000 Subject: [PATCH] Reduce string trashing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109386 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/InlineAsm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1