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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to