summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-03-27 01:24:30 +0000
committerBill Wendling <isanbard@gmail.com>2010-03-27 01:24:30 +0000
commit6888e798d3b1c5bb36e8b962058168e17cf730a3 (patch)
treead1e71507dbe5d86f397942fff1f747c5f938b9e /llvm/lib/CodeGen/SelectionDAG
parentec8b44adebdaec786fba8a92efae7ab59cd49f66 (diff)
downloadbcm5719-llvm-6888e798d3b1c5bb36e8b962058168e17cf730a3.tar.gz
bcm5719-llvm-6888e798d3b1c5bb36e8b962058168e17cf730a3.zip
Forgot the part where we handle the ".llvm.eh.catch.all.value".
llvm-svn: 99697
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 50f4c325a16..4fb2aa299cb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -281,8 +281,17 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) {
GlobalVariable *llvm::ExtractTypeInfo(Value *V) {
V = V->stripPointerCasts();
GlobalVariable *GV = dyn_cast<GlobalVariable>(V);
- assert ((GV || isa<ConstantPointerNull>(V)) &&
- "TypeInfo must be a global variable or NULL");
+
+ if (GV && GV->getName() == ".llvm.eh.catch.all.value") {
+ assert(GV->hasInitializer() &&
+ "The EH catch-all value must have an initializer");
+ Value *Init = GV->getInitializer();
+ GV = dyn_cast<GlobalVariable>(Init);
+ if (!GV) V = cast<ConstantPointerNull>(Init);
+ }
+
+ assert((GV || isa<ConstantPointerNull>(V)) &&
+ "TypeInfo must be a global variable or NULL");
return GV;
}
OpenPOWER on IntegriCloud