[PATCH] D75805: Make malign-double effective only for x86

kamlesh kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 7 05:07:21 PST 2020


kamleshbhalui created this revision.
kamleshbhalui added a reviewer: rnk.
kamleshbhalui added a project: clang.
Herald added a subscriber: cfe-commits.

Making -malign-double effective only for x86.

Fixes.
https://bugs.llvm.org/show_bug.cgi?id=45136


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75805

Files:
  clang/lib/Frontend/CompilerInvocation.cpp


Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -2916,7 +2916,7 @@
   Opts.EmitAllDecls = Args.hasArg(OPT_femit_all_decls);
   Opts.PackStruct = getLastArgIntValue(Args, OPT_fpack_struct_EQ, 0, Diags);
   Opts.MaxTypeAlign = getLastArgIntValue(Args, OPT_fmax_type_align_EQ, 0, Diags);
-  Opts.AlignDouble = Args.hasArg(OPT_malign_double);
+  Opts.AlignDouble = T.getArch() == llvm::Triple::x86 && Args.hasArg(OPT_malign_double);
   Opts.LongDoubleSize = Args.hasArg(OPT_mlong_double_128)
                             ? 128
                             : Args.hasArg(OPT_mlong_double_64) ? 64 : 0;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75805.248924.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200307/82fdfe01/attachment.bin>


More information about the cfe-commits mailing list