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 | 46131bd16fbf0c6124132210f5fb9f38cbd5efdc (patch) | |
tree | 5c22886927d30db8d623077545ceb66628d0ccf9 /llvm/lib/Bytecode/Writer | |
parent | 8e9725443196b1cf644316ac9092effa4ce796c6 (diff) | |
download | bcm5719-llvm-46131bd16fbf0c6124132210f5fb9f38cbd5efdc.tar.gz bcm5719-llvm-46131bd16fbf0c6124132210f5fb9f38cbd5efdc.zip |
Fix a bug that Brian brought to my attention. This corrects:
Assembler/2004-10-22-BCWriterUndefBug.llx
llvm-svn: 17177
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r-- | llvm/lib/Bytecode/Writer/SlotCalculator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp index d4145dbcdca..0f298dcd003 100644 --- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/llvm/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. |