mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-15 07:59:50 +00:00
Use push_back rather than operator[], which is incorrect in this cases. Unfortunately, this slow the testcase down a little bit,
but only marginally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d41720a2d7
commit
e4f6ee590b
@ -1380,7 +1380,7 @@ std::string ConstantArray::getAsString() const {
|
||||
std::string Result;
|
||||
Result.reserve(getNumOperands());
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
||||
Result[i] = (char)cast<ConstantInt>(getOperand(i))->getZExtValue();
|
||||
Result.push_back((char)cast<ConstantInt>(getOperand(i))->getZExtValue());
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user