summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-04-23 22:50:03 +0000
committerDan Gohman <gohman@apple.com>2009-04-23 22:50:03 +0000
commita290ab44e8a3ca9c231f1443d96d7bcbff2afb7b (patch)
tree2c09aa29a11eac2ee3d2abf6d6ef5cda6efe5ead /llvm/lib/CodeGen/SelectionDAG
parent870c33f14bd52fcecf6a2140e16922f9a5109e42 (diff)
downloadbcm5719-llvm-a290ab44e8a3ca9c231f1443d96d7bcbff2afb7b.tar.gz
bcm5719-llvm-a290ab44e8a3ca9c231f1443d96d7bcbff2afb7b.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index b20f061e03c..fd5fcbb1aad 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud