K 10 svn:author V 6 brooks K 8 svn:date V 27 2016-03-30T21:23:19.492205Z K 7 svn:log V 1044 Apply upstream llvm r243590 Koop Mast reported that on FreeBSD 10.1-R i386, devel/libclc gets a build error, when its 'prepare-builtins' segfaults. It turns out this is due to a stack overflow, when recursively sorting an internal list. Upstream, this was changed to an iterative operation, to prevent stack overflow in some cases, here: http://reviews.llvm.org/rL243590 ------------------------------------------------------------------------ r243590 | matze | 2015-07-30 01:22:48 +0200 (Thu, 30 Jul 2015) | 9 lines IR: Implement Value::mergeUseLists() iteratively This avoids stack overflows when the the compiler does not perform tail call elimination. Apparently this happens for MSVC with the /Ob2 switch which may be used by external code including this header. Reported by and based on a patch from Jean-Francois Riendeau. Related to rdar://21900756 ------------------------------------------------------------------------ I have verified this allows devel/libclc to build successfully on 10.1-R. PR: 208403 Submitted by: dim END