mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
Use StringRef::substr instead of std::string::substr to avoid using a free'd
string temporary. This should fix PR6590. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb2f0c541c
commit
018cbd5ddf
@ -9837,7 +9837,8 @@ bool X86TargetLowering::ExpandInlineAsm(CallInst *CI) const {
|
||||
AsmPieces[2] == "${0:w}" &&
|
||||
IA->getConstraintString().compare(0, 5, "=r,0,") == 0) {
|
||||
AsmPieces.clear();
|
||||
SplitString(IA->getConstraintString().substr(5), AsmPieces, ",");
|
||||
const std::string &Constraints = IA->getConstraintString();
|
||||
SplitString(StringRef(Constraints).substr(5), AsmPieces, ",");
|
||||
std::sort(AsmPieces.begin(), AsmPieces.end());
|
||||
if (AsmPieces.size() == 4 &&
|
||||
AsmPieces[0] == "~{cc}" &&
|
||||
|
Loading…
Reference in New Issue
Block a user