[lld] [llvm] [lld][AArch64][Build Attributes] Add support for converting AArch64 Build Attributes to GNU Properties (PR #131990)
Jack Styles via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 04:19:29 PDT 2025
================
@@ -32,14 +32,21 @@ struct BuildAttributeItem {
unsigned Tag;
unsigned IntValue;
std::string StringValue;
+ BuildAttributeItem() {};
BuildAttributeItem(Types Ty, unsigned Tg, unsigned IV, std::string SV)
: Type(Ty), Tag(Tg), IntValue(IV), StringValue(std::move(SV)) {}
};
+
struct BuildAttributeSubSection {
- StringRef Name;
+ std::string Name;
----------------
Stylie777 wrote:
If you want to create it as a copy, then `BASubSection.Name = VendorName;` will need to become `BASubSection.Name = VendorName.str();` in `llvm/lib/Support/ELFAttrParserExtended.cpp`. This will ensure the string is correctly copied as a `std::string` rather than relying on the compiler correctly assuming it should be this. I think being explicit here is better.
I also think this is something that can be done in a separate PR. This PR is focused on the lld changes, and this is unrelated to the lld changes.
https://github.com/llvm/llvm-project/pull/131990
More information about the llvm-commits
mailing list