mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Allow the use of functions as typeinfo in landingpad clauses
This is one step towards supporting SEH filter functions in LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221954 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -109,15 +109,16 @@ void llvm::ComputeValueVTs(const TargetLowering &TLI, Type *Ty,
|
||||
}
|
||||
|
||||
/// ExtractTypeInfo - Returns the type info, possibly bitcast, encoded in V.
|
||||
GlobalVariable *llvm::ExtractTypeInfo(Value *V) {
|
||||
GlobalValue *llvm::ExtractTypeInfo(Value *V) {
|
||||
V = V->stripPointerCasts();
|
||||
GlobalVariable *GV = dyn_cast<GlobalVariable>(V);
|
||||
GlobalValue *GV = dyn_cast<GlobalValue>(V);
|
||||
GlobalVariable *Var = dyn_cast<GlobalVariable>(V);
|
||||
|
||||
if (GV && GV->getName() == "llvm.eh.catch.all.value") {
|
||||
assert(GV->hasInitializer() &&
|
||||
if (Var && Var->getName() == "llvm.eh.catch.all.value") {
|
||||
assert(Var->hasInitializer() &&
|
||||
"The EH catch-all value must have an initializer");
|
||||
Value *Init = GV->getInitializer();
|
||||
GV = dyn_cast<GlobalVariable>(Init);
|
||||
Value *Init = Var->getInitializer();
|
||||
GV = dyn_cast<GlobalValue>(Init);
|
||||
if (!GV) V = cast<ConstantPointerNull>(Init);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user