[Mesa-dev] [PATCH] clover: Fix build against LLVM SVN >= r266163

Michel Dänzer michel at daenzer.net
Thu Apr 14 02:59:13 UTC 2016


On 14.04.2016 03:59, Francisco Jerez wrote:
> Michel Dänzer <michel at daenzer.net> writes:
> 
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> createInternalizePass now takes a callback instead of a StringSet.
>>
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>> ---
>>  src/gallium/state_trackers/clover/llvm/invocation.cpp | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
>> index 4d11c24..97acd03 100644
>> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
>> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
>> @@ -322,6 +322,18 @@ namespace {
>>        // list of kernel functions to the internalizer.  The internalizer will
>>        // treat the functions in the list as "main" functions and internalize
>>        // all of the other functions.
>> +#if HAVE_LLVM >= 0x0309
>> +      auto preserve_kernels = [=](const llvm::GlobalValue &GV) {
>> +         for (std::vector<llvm::Function *>::const_iterator I = kernels.begin(),
>> +                                                            E = kernels.end();
>> +                                                            I != E; ++I) {
>> +            llvm::Function *kernel = *I;
> 
> 'for (const auto &kernel : kernels) {' instead of the last four lines of
> code?  With my style nitpick taken into account:
> 
> Reviewed-by: Francisco Jerez <currojerez at riseup.net>

Pushed with your suggestion, thanks (also to Tom for the review of my
original patch).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160414/556cb919/attachment.sig>


More information about the mesa-dev mailing list