aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-24 04:27:59 +0000
committerChris Lattner <sabre@nondot.org>2004-10-24 04:27:59 +0000
commit236ca4467f244ee717872eb813053ed244e308f0 (patch)
tree387faae1fa3efd7b5649d66a8a6f2ff8adf0b596
parentcf1160b0127daae2b9197637b5ecd99a720706a0 (diff)
downloadexternal_llvm-236ca4467f244ee717872eb813053ed244e308f0.zip
external_llvm-236ca4467f244ee717872eb813053ed244e308f0.tar.gz
external_llvm-236ca4467f244ee717872eb813053ed244e308f0.tar.bz2
Fix the previous bug the correct way. This fixes ptrdist/bc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17201 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp
index 0f298dc..575dd34 100644
--- a/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -151,8 +151,8 @@ void SlotCalculator::processModule() {
unsigned FirstNonStringID = 0;
for (unsigned i = 0, e = Plane.size(); i != e; ++i)
if (isa<ConstantAggregateZero>(Plane[i]) ||
- isa<UndefValue>(Plane[i]) ||
- cast<ConstantArray>(Plane[i])->isString()) {
+ (isa<ConstantArray>(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) {