LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 29 May 2013 03:13:47 +0000 (03:13 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 29 May 2013 03:13:47 +0000 (03:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182820 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Vectorize/LoopVectorize.cpp

index 41a22f9bf4665492a4aa57b1569d609e5f576a37..74f69b4c36d2c5902e00442795d2407d69ddc6f9 100644 (file)
@@ -812,8 +812,7 @@ struct LoopVectorizeHints {
       for (unsigned i = 1, ie = LoopID->getNumOperands(); i < ie; ++i)
         Vals.push_back(LoopID->getOperand(i));
 
-    Twine Name = Prefix() + "width";
-    Vals.push_back(createHint(Context, Name.str(), Width));
+    Vals.push_back(createHint(Context, Twine(Prefix(), "width").str(), Width));
 
     MDNode *NewLoopID = MDNode::get(Context, Vals);
     // Set operand 0 to refer to the loop id itself.