<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 3:09 AM, Nema, Ashutosh <span dir="ltr"><<a href="mailto:Ashutosh.Nema@amd.com" target="_blank">Ashutosh.Nema@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri" size="2"><span style="font-size:11pt">
<div>I was trying to extend “VectorUtils.h”, found all functions are defined as static. </div>
<div>The common problem when we include this and only use few function, compiler throw </div>
<div>warning for unused functions.</div>
<div> </div>
<div>i.e.</div>
<div>>  llvm/include/llvm/Transforms/Utils/VectorUtils.h:102:1: warning: </div>
<div>>  ‘llvm::Intrinsic::ID llvm::getIntrinsicIDForCall(llvm::CallInst*, const llvm::TargetLibraryInfo*)’ </div>
<div>>  defined but not used [-Wunused-function]</div>
<div>>  getIntrinsicIDForCall(CallInst *CI, const TargetLibraryInfo *TLI) {</div>
<div>>  ^</div>
<div> </div>
<div>Any specific reason, why these function are defined as static ?</div>
<div> </div>
<div>If not, can we make these as non-static functions, by moving them to separate cpp </div>
<div>file (i.e. “VectorUtils.cpp”) and keep declaration in header (“VectorUtils.h”) ?</div></span></font></div></blockquote><div><br>You can just change them from static to inline (or move them out to an implementation file if you like). Looks like oversight when this was originally committed.<br><br>- David<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><font face="Calibri" size="2"><span style="font-size:11pt">
<div> </div>
<div>Thanks,</div>
<div>Ashutosh</div>
<div> </div>
<div> </div>
</span></font>
</div>

<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>