Adjustments to support the new ConstantAggregateZero class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11474 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-02-15 05:55:15 +00:00
parent cfb0fd2ce8
commit de512b5b2e
10 changed files with 79 additions and 41 deletions

View File

@ -146,7 +146,8 @@ void SlotCalculator::processModule() {
TypePlane &Plane = Table[plane];
unsigned FirstNonStringID = 0;
for (unsigned i = 0, e = Plane.size(); i != e; ++i)
if (cast<ConstantArray>(Plane[i])->isString()) {
if (isa<ConstantAggregateZero>(Plane[i]) ||
cast<ConstantArray>(Plane[i])->isString()) {
// Check to see if we have to shuffle this string around. If not,
// don't do anything.
if (i != FirstNonStringID) {