aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-05-13 15:18:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-05-13 15:18:06 +0000
commit3fa82837441d716a225427f7a924f36d21db3a32 (patch)
tree46504366629499f3e15ceeeb776376a7677ee694 /lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
parenteea6c95d5d9f202ccb4e90995dc8a4a4c439cec3 (diff)
Make codegen able to handle values of empty types. This is one way
to fix PR9900. I will keep it open until sable is able to comment on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index a1e8254189..2cb16f589a 100644
--- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -155,6 +155,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) {
const PHINode *PN = dyn_cast<PHINode>(I); ++I) {
if (PN->use_empty()) continue;
+ // Skip empty types
+ if (PN->getType()->isEmptyTy())
+ continue;
+
DebugLoc DL = PN->getDebugLoc();
unsigned PHIReg = ValueMap[PN];
assert(PHIReg && "PHI node does not have an assigned virtual register!");