No its used right here in the same file. It only warns on C++11 enabled builds.<div><br></div><div><pre style="font-size:medium;background-color:rgb(255,255,255)">    <b><font color="#228B22">virtual</font></b> <b><font color="#228B22">void</font></b> getAnalysisUsage(AnalysisUsage &AU) <b><font color="#228B22">const</font></b> {
      AU.setPreservesAll();
      AU.addRequiredID(<b>PreVerifyID</b>);</pre><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 9:41 AM, Matthieu Monrocq <span dir="ltr"><<a href="mailto:matthieu.monrocq@gmail.com" target="_blank">matthieu.monrocq@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 class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 8:51 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, Oct 25, 2012 at 10:48 PM, Craig Topper <<a href="mailto:craig.topper@gmail.com" target="_blank">craig.topper@gmail.com</a>> wrote:<br>
> I think this change broke bootstrap builds with C++11 and -Werror enabled.<br>
><br>
> lib/VMCore/Verifier.cpp:116:14: error: variable 'PreVerifyID' is not needed<br>
> and will not be emitted [-Werror,-Wunneeded-internal-declaration]<br>
> static char &PreVerifyID = PreVerifier::ID;<br>
<br>
</div>Yes, I think this change probably caused that. I'm unclear on what the<br>
purpose of that warning is: it appears to be warning on variables<br>
which are referenced but not odr-used, which seems like a pretty<br>
questionable thing to warn on. It'd be easy enough to fix this by<br>
teaching Sema::ShouldWarnIfUnusedFileScopedDecl to ignore references<br>
(along with its existing check for const variables), but I'm not sure<br>
that's the right fix, since I'm not really sure what the intent is<br>
here.<br></blockquote></div><br><br></div></div>Is not PreVerifyID just an unused variable ? (not the difference with PreVerifier::ID)<span class="HOEnZb"><font color="#888888"><br><br>-- Matthieu<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>~Craig<br>
</div>