diff --git a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp --- a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp +++ b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp @@ -93,8 +93,13 @@ Ty = DTy->getBaseType(); } - if (Ty->getName().empty()) - report_fatal_error("Empty type name for BTF_TYPE_ID_REMOTE reloc"); + if (Ty->getName().empty()) { + if (isa(Ty)) + report_fatal_error( + "SubroutineType not supported for BTF_TYPE_ID_REMOTE reloc"); + else + report_fatal_error("Empty type name for BTF_TYPE_ID_REMOTE reloc"); + } MD = Ty; }