mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
Reserve the size we'll need in advance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e97790682
commit
aefacb5972
@ -1004,6 +1004,7 @@ bool llvm::GetConstantStringInfo(Value *V, std::string &Str) {
|
|||||||
|
|
||||||
// Traverse the constant array from StartIdx (derived above) which is
|
// Traverse the constant array from StartIdx (derived above) which is
|
||||||
// the place the GEP refers to in the array.
|
// the place the GEP refers to in the array.
|
||||||
|
Str.reserve(NumElts);
|
||||||
for (unsigned i = StartIdx; i < NumElts; ++i) {
|
for (unsigned i = StartIdx; i < NumElts; ++i) {
|
||||||
Constant *Elt = Array->getOperand(i);
|
Constant *Elt = Array->getOperand(i);
|
||||||
ConstantInt *CI = dyn_cast<ConstantInt>(Elt);
|
ConstantInt *CI = dyn_cast<ConstantInt>(Elt);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user