diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-23 03:10:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-23 03:10:23 +0000 |
commit | 5fd2ab3518d4d37da7f91b23a03d36f7ed4880f9 (patch) | |
tree | de104508641f09220acb7d712798c9ed20416d74 | |
parent | 7450d81342dc58409d084468f6594adcd96319d4 (diff) | |
download | external_llvm-5fd2ab3518d4d37da7f91b23a03d36f7ed4880f9.zip external_llvm-5fd2ab3518d4d37da7f91b23a03d36f7ed4880f9.tar.gz external_llvm-5fd2ab3518d4d37da7f91b23a03d36f7ed4880f9.tar.bz2 |
Fix a bug that Brian brought to my attention. This corrects:
Assembler/2004-10-22-BCWriterUndefBug.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17177 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index d4145db..0f298dc 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -150,7 +150,8 @@ void SlotCalculator::processModule() { TypePlane &Plane = Table[plane]; unsigned FirstNonStringID = 0; for (unsigned i = 0, e = Plane.size(); i != e; ++i) - if (isa<ConstantAggregateZero>(Plane[i]) || + if (isa<ConstantAggregateZero>(Plane[i]) || + isa<UndefValue>(Plane[i]) || cast<ConstantArray>(Plane[i])->isString()) { // Check to see if we have to shuffle this string around. If not, // don't do anything. |