[PATCH] D150079: [BPF][DebugInfo] Show CO-RE relocations in llvm-objdump
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 20:53:09 PDT 2023
MaskRay added a comment.
Seems good in shape! Wonder whether @jhenderson has some comments.
================
Comment at: llvm/include/llvm/DebugInfo/BTF/BTF.h:102
+// Constants for CommonType::Info field
+enum : uint32_t { FWD_UNION_FLAG = (1u << 31), ENUM_SIGNED_FLAG = (1u << 31) };
+
----------------
prefer `constexpr uint32_t` to enum, especially that these are bit masks.
================
Comment at: llvm/lib/DebugInfo/BTF/BTFParser.cpp:205
+ StringRef RawData) {
+ using support::big;
+ using support::endianness;
----------------
Some using declarations such as big,little, seem unnecessary?
================
Comment at: llvm/lib/DebugInfo/BTF/BTFParser.cpp:212
+ TypesBuffer = OwningArrayRef<uint8_t>(
+ ArrayRef<uint8_t>((const uint8_t *)RawData.data(), RawData.size()));
+ // Switch endianness if necessary
----------------
arrayRefFromStringRef
================
Comment at: llvm/test/tools/llvm-objdump/BPF/core-relo-byte-offset.ll:6
+; RUN: llc --mtriple bpfel %s --filetype=obj -o - \
+; RUN: | llvm-objdump --no-addresses --no-show-raw-insn -dr - \
+; RUN: | FileCheck %s
----------------
For continuation lines we indent by 2.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150079/new/
https://reviews.llvm.org/D150079
More information about the llvm-commits
mailing list