diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Target/BPF/BPFCORE.h | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Target/BPF/BPFCORE.h')
-rw-r--r-- | llvm/lib/Target/BPF/BPFCORE.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm/lib/Target/BPF/BPFCORE.h b/llvm/lib/Target/BPF/BPFCORE.h index ed4778353e529..af6425b16fa01 100644 --- a/llvm/lib/Target/BPF/BPFCORE.h +++ b/llvm/lib/Target/BPF/BPFCORE.h @@ -9,22 +9,36 @@ #ifndef LLVM_LIB_TARGET_BPF_BPFCORE_H #define LLVM_LIB_TARGET_BPF_BPFCORE_H +#include "llvm/ADT/StringRef.h" + namespace llvm { class BPFCoreSharedInfo { public: - enum OffsetRelocKind : uint32_t { + enum PatchableRelocKind : uint32_t { FIELD_BYTE_OFFSET = 0, FIELD_BYTE_SIZE, FIELD_EXISTENCE, FIELD_SIGNEDNESS, FIELD_LSHIFT_U64, FIELD_RSHIFT_U64, + BTF_TYPE_ID_LOCAL, + BTF_TYPE_ID_REMOTE, MAX_FIELD_RELOC_KIND, }; + + enum BTFTypeIdFlag : uint32_t { + BTF_TYPE_ID_LOCAL_RELOC = 0, + BTF_TYPE_ID_REMOTE_RELOC, + + MAX_BTF_TYPE_ID_FLAG, + }; + /// The attribute attached to globals representing a field access - static const std::string AmaAttr; + static constexpr StringRef AmaAttr = "btf_ama"; + /// The attribute attached to globals representing a type id + static constexpr StringRef TypeIdAttr = "btf_type_id"; }; } // namespace llvm |