[llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 07:57:00 PST 2024
================
@@ -793,20 +793,23 @@ void ARMTargetELFStreamer::switchVendor(StringRef Vendor) {
void ARMTargetELFStreamer::emitAttribute(unsigned Attribute, unsigned Value) {
getStreamer().setAttributeItem(Attribute, Value,
- /* OverwriteExisting= */ true);
+ /* OverwriteExisting= */ true,
+ getStreamer().Contents);
----------------
sivan-shani wrote:
Emitting into a specific subsection is not complicated.
All that is required is 1. first, create the subsection and add it to the subsections vector (AArch64TargetELFStreamer::emitSubsection) 2. then, use AArch64TargetELFStreamer::emitAttribute which will emit it into the correct subsection.
Providing the data structure as an argument to the function rather then using the 'this' pointer (= the data structure that is in the class) data structure is, arguably, the more 'correct' way to construct a function in principal. Therefore it did not seems as a concern to change it. It might seems as a preferable solution to adding more functions to the base class.
Let me know what you think, no objection to changing it if you still think it is the better approach.
https://github.com/llvm/llvm-project/pull/118771
More information about the llvm-commits
mailing list