<div dir="ltr">My pleasure :-)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 7:19 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot.<br>
<br>
So sorry I missed the patch when it first went out for review.<br>
<br>
Cheers,<br>
Rafael<br>
<br>
<br>
On 3 February 2016 at 16:13, Todd Fiala via llvm-commits<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: tfiala<br>
> Date: Wed Feb  3 15:13:23 2016<br>
> New Revision: 259695<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=259695&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=259695&view=rev</a><br>
> Log:<br>
> Address NDEBUG-related linkage issues for Value::assertModuleIsMaterialized()<br>
><br>
> The IR/Value class had a linkage issue present when LLVM was built<br>
> as a library, and the LLVM library build time had different settings<br>
> for NDEBUG than the client of the LLVM library.  Clients could get<br>
> into a state where the LLVM lib expected<br>
> Value::assertModuleIsMaterialized() to be inline-defined in the header<br>
> but clients expected that method to be defined in the LLVM library.<br>
><br>
> See this llvm-commits thread for more details:<br>
> <a href="http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160201/329667.html</a><br>
><br>
> Modified:<br>
>     llvm/trunk/include/llvm/IR/Value.h<br>
>     llvm/trunk/lib/IR/Value.cpp<br>
><br>
> Modified: llvm/trunk/include/llvm/IR/Value.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Value.h?rev=259695&r1=259694&r2=259695&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Value.h?rev=259695&r1=259694&r2=259695&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/IR/Value.h (original)<br>
> +++ llvm/trunk/include/llvm/IR/Value.h Wed Feb  3 15:13:23 2016<br>
> @@ -280,11 +280,7 @@ public:<br>
>    // when using them since you might not get all uses.<br>
>    // The methods that don't start with materialized_ assert that modules is<br>
>    // fully materialized.<br>
> -#ifdef NDEBUG<br>
> -  void assertModuleIsMaterialized() const {}<br>
> -#else<br>
>    void assertModuleIsMaterialized() const;<br>
> -#endif<br>
><br>
>    bool use_empty() const {<br>
>      assertModuleIsMaterialized();<br>
><br>
> Modified: llvm/trunk/lib/IR/Value.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=259695&r1=259694&r2=259695&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=259695&r1=259694&r2=259695&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/IR/Value.cpp (original)<br>
> +++ llvm/trunk/lib/IR/Value.cpp Wed Feb  3 15:13:23 2016<br>
> @@ -314,8 +314,8 @@ void Value::takeName(Value *V) {<br>
>      ST->reinsertValue(this);<br>
>  }<br>
><br>
> -#ifndef NDEBUG<br>
>  void Value::assertModuleIsMaterialized() const {<br>
> +#ifndef NDEBUG<br>
>    const GlobalValue *GV = dyn_cast<GlobalValue>(this);<br>
>    if (!GV)<br>
>      return;<br>
> @@ -323,8 +323,10 @@ void Value::assertModuleIsMaterialized()<br>
>    if (!M)<br>
>      return;<br>
>    assert(M->isMaterialized());<br>
> +#endif<br>
>  }<br>
><br>
> +#ifndef NDEBUG<br>
>  static bool contains(SmallPtrSetImpl<ConstantExpr *> &Cache, ConstantExpr *Expr,<br>
>                       Constant *C) {<br>
>    if (!Cache.insert(Expr).second)<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-Todd</div></div>
</div>