[PATCH] D116063: BPF: report better error message for BTF_TYPE_ID_REMOTE relo failure

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 21:14:59 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG76b7d734291c: BPF: report better error message for BTF_TYPE_ID_REMOTE relo failure (authored by yonghong-song).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116063/new/

https://reviews.llvm.org/D116063

Files:
  llvm/lib/Target/BPF/BPFPreserveDIType.cpp


Index: llvm/lib/Target/BPF/BPFPreserveDIType.cpp
===================================================================
--- llvm/lib/Target/BPF/BPFPreserveDIType.cpp
+++ 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<DISubroutineType>(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;
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116063.395587.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211221/33f6636f/attachment.bin>


More information about the llvm-commits mailing list