[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 02:34:53 PST 2024


================
@@ -105,27 +107,55 @@ class MCELFStreamer : public MCObjectStreamer {
     unsigned Tag;
     unsigned IntValue;
     std::string StringValue;
+    AttributeItem(Types Ty, unsigned Tg, unsigned IV, std::string SV)
+        : Type(Ty), Tag(Tg), IntValue(IV), StringValue(SV) {}
+  };
+
+  /// ELF object attributes subsection support
+  struct AttributeSubSection {
+    bool IsActive; // Indicates whether the section is the active section,
+                   // required for assembly parsing
+    // [<uint32: subsection-length> NTBS: vendor-name <bytes: vendor-data>]*
+    StringRef VendorName;
+    // <uint8: optional> <uint8: parameter type> <attribute>*
+    ARMBuildAttrs::SubsectionOptional IsOptional;
----------------
ostannard wrote:

AArch64-specific data types shouldn't be used in target-independent headers. Either `SubsectionOptional` and `SubsectionType` should be moved to a target-independent header, or the whole `AttributeSubSection` type should be moved down to an AArch64 file.

https://github.com/llvm/llvm-project/pull/118771


More information about the llvm-commits mailing list