[PATCH] D26968: [ARM] Add Driver support for emmitting the missing Tag_ABI_enum_size build attribute values

Alexandros Lamprineas via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 22 05:40:28 PST 2016


labrinea created this revision.
labrinea added reviewers: cfe-commits, rengolin.
Herald added a subscriber: aemerson.

The ABI for the ARM architecture <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf> describes four build attribute values for the size of enumeration types. Currently, Clang cannot instruct LLVM to 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 the Driver flags '-fno-enums' and '-fabi-enums' to indicate the missing values. The build attribute values are passed to LLVM via metadata in the IR.


https://reviews.llvm.org/D26968

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/LangOptions.def
  include/clang/Driver/Options.td
  lib/Basic/Targets.cpp
  lib/CodeGen/CodeGenModule.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Sema/SemaExpr.cpp
  test/CodeGen/arm-metadata.c
  test/Driver/clang_f_opts.c
  test/Preprocessor/aarch64-target-features.c
  test/Preprocessor/arm-target-features.c
  test/Sema/no-enums.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26968.78851.patch
Type: text/x-patch
Size: 15124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161122/1a05569d/attachment-0001.bin>


More information about the cfe-commits mailing list