diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-13 15:18:06 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-13 15:18:06 +0000 |
commit | e53b7d1a11d180ed7b33190a837d8898ab2a0b71 (patch) | |
tree | e370204b933a22309c8343cff0e60e9d1a563f95 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | c586166fe3499fbe0965aa1d67e81289f38ea175 (diff) | |
download | bcm5719-llvm-e53b7d1a11d180ed7b33190a837d8898ab2a0b71.tar.gz bcm5719-llvm-e53b7d1a11d180ed7b33190a837d8898ab2a0b71.zip |
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.
llvm-svn: 131294
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index a1e8254189f..2cb16f589a8 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/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!"); |