LoopVectorize.cpp: Fix abuse of StringRef on Twine. Twine captures the pointer of StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2013-05-29 03:13:47 +00:00
parent 51c292a360
commit 0cf4adbcef

View 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.