[PATCH] D28281: [ARM] Enable objdump to construct a useful triple for ARM

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 02:03:34 PST 2017


samparker added a comment.

Hi Renato,

Thanks for the review. For attribute printing and parsing, I was hoping that the current readobj tests would be sufficient since hopefully I have not changed the functionality of that tool. Also, how would you suggest building a triple from just the build attributes? Currently I use the existing triple to only decide whether it should be an arm or thumb triple and I don't believe build attributes can help here. Unless you mean for thumb only targets?

Cheers,



================
Comment at: include/llvm/Support/ARMAttributeParser.h:24
+
+  std::map<unsigned, std::pair<unsigned, std::string>> Attributes;
 
----------------
rengolin wrote:
> Why map to a pair if you only use the `unsigned` value?
This was so that if someone else wanted the string value from a string attribute, it would be available.


================
Comment at: lib/Object/ELFObjectFile.cpp:140
+
+  switch(Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch)) {
+  case ARMBuildAttrs::v4:
----------------
rengolin wrote:
> This list doesn't have all possible values documented in the ABI.
good catch, i will add them.


https://reviews.llvm.org/D28281





More information about the llvm-commits mailing list