[PATCH] Fix for nasty LTO issue that's most obvious in ObjectiveC.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Nov 6 12:21:48 PST 2014


On 6 November 2014 12:22, Kevin Frei <freik at fb.com> wrote:
> The reason I wasn't sure which was correct is because isExternallyIntialized is a default ctor parameter, so if someone's specifying a different value, then calling the copyAttributesFrom to fill in everything else, it's a bug. From a design perspective, having an API like copyAttributesFrom for a type with a ctor that has default parameters seems incredibly confusing. Perhaps I should eliminate the default parameter? And maybe this discussion should move over to llvmdev?

copyAttributesFrom is used when two GV are being merged or one is
being copied. The default constructor options are just a convenience
for when one value is more common than others, so the two seem
unrelated.

Cheers,
Rafael




More information about the llvm-commits mailing list