Skip to content

Commit

Permalink
Forgot the part where we handle the ".llvm.eh.catch.all.value".
Browse files Browse the repository at this point in the history
llvm-svn: 99697
  • Loading branch information
isanbard committed Mar 27, 2010
1 parent ec8b44a commit 6888e79
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6888e79

Please sign in to comment.