[PATCH] Emit the ARM build attributes ABI_PCS_wchar_t and ABI_enum_size.

Renato Golin renato.golin at linaro.org
Thu Jun 19 09:36:01 PDT 2014


================
Comment at: include/llvm/Support/ARMBuildAttributes.h:163
@@ +162,3 @@
+  // Tag_ABI_PCS_wchar_t
+  WCharProhibited = 0,  // wchar_t is not used
+  WCharWidth2Bytes = 2, // sizeof(wchar_t) == 2
----------------
you're never using, nor testing this...

================
Comment at: include/llvm/Support/ARMBuildAttributes.h:175
@@ +174,3 @@
+  // Tag_ABI_enum_size
+  EnumProhibited = 0, // The user prohibited the use of enums when building
+                      // this entity.
----------------
you're never using, nor testing this...

================
Comment at: include/llvm/Support/ARMBuildAttributes.h:180
@@ +179,3 @@
+  Enum32Bit = 2,      // Enum is at least 32 bits.
+  Enum32BitABI = 3,   // Every enumeration visible across an ABI-complying
+                      // interface contains a value needing 32 bits to encode
----------------
you're never using, nor testing this...

================
Comment at: test/CodeGen/ARM/metadata-default.ll:13
@@ +12,3 @@
+
+!0 = metadata !{i32 1, metadata !"short_wchar", i32 0}
+!1 = metadata !{i32 1, metadata !"short_enum", i32 0}
----------------
shouldn't this value be the actual number of bytes used? so than you can forbid usage from the front-end later.

================
Comment at: test/CodeGen/ARM/metadata-default.ll:14
@@ +13,3 @@
+!0 = metadata !{i32 1, metadata !"short_wchar", i32 0}
+!1 = metadata !{i32 1, metadata !"short_enum", i32 0}
+
----------------
I think this one could be a bit more expressive, such as using a string, so that we can disable or use the fourth style, which is currently inaccessible.

http://reviews.llvm.org/D4213






More information about the llvm-commits mailing list