diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-23 22:50:03 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-23 22:50:03 +0000 |
commit | a9e5bc4df356b074e280ad444ffd5364272d37ec (patch) | |
tree | f3573f0549fdab18a4a653443da8dbb2828ed769 /lib/CodeGen | |
parent | 483b568bc9af9305b1c183b5034763ee1eda908c (diff) | |
download | external_llvm-a9e5bc4df356b074e280ad444ffd5364272d37ec.zip external_llvm-a9e5bc4df356b074e280ad444ffd5364272d37ec.tar.gz external_llvm-a9e5bc4df356b074e280ad444ffd5364272d37ec.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index b20f061..fd5fcbb 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -135,6 +135,9 @@ static void ComputeValueVTs(const TargetLowering &TLI, const Type *Ty, StartingOffset + i * EltSize); return; } + // Interpret void as zero return values. + if (Ty == Type::VoidTy) + return; // Base case: we can get an MVT for this LLVM IR type. ValueVTs.push_back(TLI.getValueType(Ty)); if (Offsets) |