[PATCH] D149501: [BPF][DebugInfo][NFC] Move BTF.h definitions from BPF target to DebugInfo

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 14:50:30 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG0e7ff05fb351: [BPF][DebugInfo][NFC] Move BTF.h definitions from BPF target to DebugInfo (authored by eddyz87, committed by MaskRay).

Changed prior to commit:
  https://reviews.llvm.org/D149501?vs=518487&id=538836#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149501

Files:
  llvm/include/llvm/DebugInfo/BTF/BTF.def
  llvm/include/llvm/DebugInfo/BTF/BTF.h
  llvm/lib/Target/BPF/BTF.def
  llvm/lib/Target/BPF/BTF.h
  llvm/lib/Target/BPF/BTFDebug.cpp
  llvm/lib/Target/BPF/BTFDebug.h


Index: llvm/lib/Target/BPF/BTFDebug.h
===================================================================
--- llvm/lib/Target/BPF/BTFDebug.h
+++ llvm/lib/Target/BPF/BTFDebug.h
@@ -16,11 +16,11 @@
 
 #include "llvm/ADT/StringMap.h"
 #include "llvm/CodeGen/DebugHandlerBase.h"
+#include "llvm/DebugInfo/BTF/BTF.h"
 #include <cstdint>
 #include <map>
 #include <set>
 #include <unordered_map>
-#include "BTF.h"
 
 namespace llvm {
 
Index: llvm/lib/Target/BPF/BTFDebug.cpp
===================================================================
--- llvm/lib/Target/BPF/BTFDebug.cpp
+++ llvm/lib/Target/BPF/BTFDebug.cpp
@@ -30,7 +30,7 @@
 
 static const char *BTFKindStr[] = {
 #define HANDLE_BTF_KIND(ID, NAME) "BTF_KIND_" #NAME,
-#include "BTF.def"
+#include "llvm/DebugInfo/BTF/BTF.def"
 };
 
 /// Emit a BTF common type.
Index: llvm/include/llvm/DebugInfo/BTF/BTF.h
===================================================================
--- llvm/include/llvm/DebugInfo/BTF/BTF.h
+++ llvm/include/llvm/DebugInfo/BTF/BTF.h
@@ -152,9 +152,9 @@
 /// The exact number of BTFEnum64 is stored in the vlen (of the
 /// info in "struct CommonType").
 struct BTFEnum64 {
-  uint32_t NameOff; ///< Enum name offset in the string table
-  uint32_t Val_Lo32;     ///< Enum member lo32 value
-  uint32_t Val_Hi32;     ///< Enum member hi32 value
+  uint32_t NameOff;  ///< Enum name offset in the string table
+  uint32_t Val_Lo32; ///< Enum member lo32 value
+  uint32_t Val_Hi32; ///< Enum member hi32 value
 };
 
 /// BTF_KIND_ARRAY is followed by one "struct BTFArray".
@@ -218,10 +218,10 @@
   uint8_t Flags;
   uint32_t HdrLen;
 
-  uint32_t FuncInfoOff;    ///< Offset of func info section
-  uint32_t FuncInfoLen;    ///< Length of func info section
-  uint32_t LineInfoOff;    ///< Offset of line info section
-  uint32_t LineInfoLen;    ///< Length of line info section
+  uint32_t FuncInfoOff;   ///< Offset of func info section
+  uint32_t FuncInfoLen;   ///< Length of func info section
+  uint32_t LineInfoOff;   ///< Offset of line info section
+  uint32_t LineInfoLen;   ///< Length of line info section
   uint32_t FieldRelocOff; ///< Offset of offset reloc section
   uint32_t FieldRelocLen; ///< Length of offset reloc section
 };
@@ -263,7 +263,7 @@
 
 /// Specifying offset relocation's in one section.
 struct SecFieldReloc {
-  uint32_t SecNameOff;     ///< Section name index in the .BTF string table
+  uint32_t SecNameOff;    ///< Section name index in the .BTF string table
   uint32_t NumFieldReloc; ///< Number of offset reloc's in this section
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149501.538836.patch
Type: text/x-patch
Size: 2559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230710/718b885b/attachment.bin>


More information about the llvm-commits mailing list