[PATCH] D64283: [PowerPC] Support -mabi=ieeelongdouble and -mabi=ibmlongdouble

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 13:11:55 PDT 2019


hfinkel added a comment.

Ah, fun with overloaded, legacy command-line options...



================
Comment at: lib/Driver/ToolChains/Clang.cpp:1825
+      // that don't use the altivec abi.
+      if (!SeenOther)
+        ABIName = A->getValue();
----------------
This seems like an unintentional behavior change on top of the existing behavior (which may have also been not quite right). As best I can tell, we're trying to set ABIName equal to the last ABI type specified, unless that type is "altivec", in which case the ABI name should be its default value (either a nullptr or something like "elfv2"). With this change, we'll now take the first ABI name seen, not the last (as we'll get SeenOther to true after the first name).

Maybe we should loop over the list multiple times, once to get the long-double format, once to get the basic ABI name (where we save the default, and then if the last name found is "altivec", then reset to the default)?



Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64283/new/

https://reviews.llvm.org/D64283





More information about the cfe-commits mailing list