File indexing completed on 2026-05-10 08:44:29
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLVM_SUPPORT_ELFATTRIBUTES_H
0010 #define LLVM_SUPPORT_ELFATTRIBUTES_H
0011
0012 #include "llvm/ADT/ArrayRef.h"
0013 #include "llvm/ADT/StringRef.h"
0014 #include <optional>
0015
0016 namespace llvm {
0017
0018 struct TagNameItem {
0019 unsigned attr;
0020 StringRef tagName;
0021 };
0022
0023 using TagNameMap = ArrayRef<TagNameItem>;
0024
0025 namespace ELFAttrs {
0026
0027 enum AttrType : unsigned { File = 1, Section = 2, Symbol = 3 };
0028
0029 StringRef attrTypeAsString(unsigned attr, TagNameMap tagNameMap,
0030 bool hasTagPrefix = true);
0031 std::optional<unsigned> attrTypeFromString(StringRef tag, TagNameMap tagNameMap);
0032
0033
0034 enum AttrMagic { Format_Version = 0x41 };
0035
0036 }
0037 }
0038 #endif