[LLVMdev] Fwd: [llvm-commits] Fwd: Proof of concept patch for unifying the .s/ELF emission of .ARM.attributes

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Oct 22 21:20:10 PDT 2010


OK, after reading the docs I have some extra comments (and an updated patch).

*) To support per section or per symbol attributes we would have to
move this to the processing done in the end of the file. Lets not do
this right now.
*) We don't currently use any string attributes, so I did not implement them.
*) Having an attribute emitter class is a nice way to separate the job
of creating the attributes and the decisions of what attributes to
use.
*) The best way I could find of avoiding code duplication was to make
getCurrentFragment and getOrCreateDataFragment public. If they must
really be protected we can then create a special ARM streamer that has
the same functionality as the attribute emitter in this patch. Yet
another option is adding a method for writing over old data in the
streamer API.
*) I added support for multiple vendors, but that is not used. I can
remove if you want.
*) Using virtual methods might be too much. Let me know if you like
OutStreamer.hasRawTextSupport better. Using the class has the
advantage of having only one cast to MCObjectStreamer.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attrs.patch
Type: text/x-patch
Size: 13434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101023/86bcdb87/attachment.bin>


More information about the llvm-dev mailing list