Handle Void types in ComputeValueVTs. This doesn't currently occur,

but this change makes the code more general and easier to adapt for
new purposes.

llvm-svn: 69935
This commit is contained in:
Dan Gohman 2009-04-23 22:50:03 +00:00
parent 870c33f14b
commit a290ab44e8
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ static void ComputeValueVTs(const TargetLowering &TLI, const Type *Ty,
StartingOffset + i * EltSize); StartingOffset + i * EltSize);
return; return;
} }
// Interpret void as zero return values.
if (Ty == Type::VoidTy)
return;
// Base case: we can get an MVT for this LLVM IR type. // Base case: we can get an MVT for this LLVM IR type.
ValueVTs.push_back(TLI.getValueType(Ty)); ValueVTs.push_back(TLI.getValueType(Ty));
if (Offsets) if (Offsets)