Fix use-after-free in OptionValueString.

We were assigning a temporary std::string to a StringRef.  Somehow
this worked on every platform but Windows.

llvm-svn: 238041
This commit is contained in:
Zachary Turner 2015-05-22 19:33:54 +00:00
parent 101a82bf8b
commit 4f2a9726d4
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ OptionValueString::SetValueFromString (llvm::StringRef value,
error.SetErrorString("mismatched quotes");
return error;
}
value = value.drop_front().drop_back().str();
value = value.drop_front().drop_back();
}
break;
}