This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Emit the missing Tag_ABI_enum_size build attribute values
AbandonedPublic

Authored by labrinea on Nov 22 2016, 5:47 AM.

Details

Summary

The ABI for the ARM architecture describes four build attribute values for the size of enumeration types. Currently, LLVM cannot emit the value 0 (use of enums is prohibited) and 3 (every enumeration visible across an ABI-complying interface contains a value needing 32 bits to encode). This patch adds support for emitting the missing build attribute values.

This patch depends on Add Driver support for emitting the missing Tag_ABI_enum_size build attribute values.

Diff Detail

Event Timeline

labrinea updated this revision to Diff 78859.Nov 22 2016, 5:47 AM
labrinea retitled this revision from to [ARM] Emit the missing Tag_ABI_enum_size build attribute values.
labrinea updated this object.
labrinea added reviewers: llvm-commits, rengolin.
labrinea updated this object.Nov 22 2016, 5:50 AM
labrinea updated this object.
jmolloy requested changes to this revision.Nov 22 2016, 5:59 AM
jmolloy added a reviewer: jmolloy.
jmolloy added a subscriber: jmolloy.

Other than my inline comment this looks good!

lib/Target/ARM/ARMAsmPrinter.cpp
924

My feeling here is that we need to maintain support for the min_enum_size metadata for a while. Our bitcode policy is that it should auto-upgrade for 2 releases.

I'm aware that metadata is normally excluded from this, but this particular metadata, if omitted, will cause link failures. So I think a fallback is needed.

This revision now requires changes to proceed.Nov 22 2016, 5:59 AM
labrinea updated this revision to Diff 78878.Nov 22 2016, 8:19 AM
labrinea edited edge metadata.

Added the fallback logic for backwards compatibility.

labrinea abandoned this revision.Dec 6 2016, 2:26 AM

Abandoning this on the base that Add Driver support for emitting the missing Tag_ABI_enum_size build attribute values has been abandoned. Apologies and thank you for reviewing this.