projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d41720a
)
Use push_back rather than operator[], which is incorrect in this cases. Unfortunately...
author
Owen Anderson
<resistor@mac.com>
Wed, 25 Jun 2008 01:05:05 +0000
(
01:05
+0000)
committer
Owen Anderson
<resistor@mac.com>
Wed, 25 Jun 2008 01:05:05 +0000
(
01:05
+0000)
but only marginally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52700
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index 39c0a8c70107f5c551f574db91eee3e6449cef88..b9976a72070a59022701dc29f0d5a91e38cd28aa 100644
(file)
--- a/
lib/VMCore/Constants.cpp
+++ b/
lib/VMCore/Constants.cpp
@@
-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;
}