<div dir="ltr">For one of the structs. MaxGridSize.x depends on constructor's parameter, so I can't init it statically.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 10:37 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You might be able to do it in a non-static data member initializer instead, btw. Just initialize it where the member variable is declared.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 10:29 AM, Artem Belevich via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: tra<br>
Date: Thu May 26 12:29:20 2016<br>
New Revision: 270877<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270877&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270877&view=rev</a><br>
Log:<br>
Init member structs in constructor.<br>
<br>
Fixes build error on windows where MSVC does not<br>
support list initialization inside member initializer list.<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp?rev=270877&r1=270876&r2=270877&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp?rev=270877&r1=270876&r2=270877&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp (original)<br>
+++ llvm/trunk/lib/Target/NVPTX/NVVMIntrRange.cpp Thu May 26 12:29:20 2016<br>
@@ -38,9 +38,15 @@ class NVVMIntrRange : public FunctionPas<br>
public:<br>
static char ID;<br>
NVVMIntrRange() : NVVMIntrRange(NVVMIntrRangeSM) {}<br>
- NVVMIntrRange(unsigned int SmVersion)<br>
- : FunctionPass(ID), MaxBlockSize{1024, 1024, 64},<br>
- MaxGridSize{SmVersion >= 30 ? 0x7fffffffu : 0xffffu, 0xffff, 0xffff} {<br>
+ NVVMIntrRange(unsigned int SmVersion) : FunctionPass(ID) {<br>
+ MaxBlockSize.x = 1024;<br>
+ MaxBlockSize.y = 1024;<br>
+ MaxBlockSize.z = 64;<br>
+<br>
+ MaxGridSize.x = SmVersion >= 30 ? 0x7fffffff : 0xffff;<br>
+ MaxGridSize.y = 0xffff;<br>
+ MaxGridSize.z = 0xffff;<br>
+<br>
initializeNVVMIntrRangePass(*PassRegistry::getPassRegistry());<br>
}<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>
</div>