[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 09:00:12 PST 2024
================
@@ -294,6 +379,58 @@ AArch64ELFStreamer &AArch64TargetELFStreamer::getStreamer() {
return static_cast<AArch64ELFStreamer &>(Streamer);
}
+void AArch64TargetELFStreamer::emitSubsection(unsigned Vendor,
+ unsigned IsMandatory,
+ unsigned ParameterType) {
+ StringRef VendorAsStr = ARMBuildAttrs::vendorToStr(Vendor);
+
+ // If exists, return.
+ for (MCELFStreamer::AttributeSubSection &SubSection : AttributeSubSections) {
+ if (SubSection.Vendor == VendorAsStr) {
+ llvm_unreachable("AArch64 build attributes subsection already exists");
----------------
sivan-shani wrote:
This design does not require switching between sections in order to emit an ELF attribute to a specific section. As long as the required subsection has been created, an attribute can be emitted into it.
https://github.com/llvm/llvm-project/pull/118771
More information about the cfe-commits
mailing list