[llvm] [Object] Beginnings of SFrame parser and dumper (PR #147294)
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 04:21:09 PDT 2025
================
@@ -15,31 +15,35 @@
#ifndef LLVM_BINARYFORMAT_SFRAME_H
#define LLVM_BINARYFORMAT_SFRAME_H
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitmaskEnum.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Endian.h"
-namespace llvm::sframe {
+namespace llvm {
+
+template <typename T> struct EnumEntry;
+
+namespace sframe {
LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
constexpr uint16_t Magic = 0xdee2;
enum class Version : uint8_t {
- V1 = 1,
- V2 = 2,
+#define HANDLE_SFRAME_VERSION(CODE, NAME) NAME = CODE,
----------------
labath wrote:
Yeah, definitely. I'm actually contemplating removing this and hardcoding everything in c++. All of the enums here have at most three cases, which means that the .def file adds more boilerplate (the preprocessor goo) than it removes.
https://github.com/llvm/llvm-project/pull/147294
More information about the llvm-commits
mailing list