gkarlos
12/24/2019 - 2:27 AM

[LLVM Detect Function Pointer] Detect if target of AllocaInst is a function pointer #LLVM

[LLVM Detect Function Pointer] Detect if target of AllocaInst is a function pointer #LLVM

bool isFunctionPointerType(Type *type){
  if(PointerType *pointerType=dyn_cast<PointerType>(type))
    return isFunctionPointerType(pointerType->getElementType());
  else 
    return type->isFunctionTy();
}