<div dir="ltr">Hopefully fixed by removing the unnecessary 'typename' in r201450.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 4:34 PM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rafael,<br>
<br>
My compiler is warning on this patch: "'typename' occurs outside of a<br>
template [-W++11-extensions]".<br>
<br>
This may need to be reverted until we make the switch to C++11.<br>
<br>
Cheers,<br>
Lang.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Feb 14, 2014 at 2:36 PM, Rafael Espindola<br>
<<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
> Author: rafael<br>
> Date: Fri Feb 14 16:36:16 2014<br>
> New Revision: 201440<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=201440&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=201440&view=rev</a><br>
> Log:<br>
> Add extern template instantiations of llvm::Calculate.<br>
><br>
> This should be a small build time improvement in general and fixes<br>
> the build on OS X with -DBUILD_SHARED_LIBS=ON.<br>
><br>
> The issue is that not all users are including GenericDomTreeConstruction.h,<br>
> causing undefined references when ld64 managed to hide the<br>
> linkonce_odr symbols.<br>
><br>
> Modified:<br>
>     llvm/trunk/include/llvm/IR/Dominators.h<br>
>     llvm/trunk/lib/IR/Dominators.cpp<br>
><br>
> Modified: llvm/trunk/include/llvm/IR/Dominators.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Dominators.h?rev=201440&r1=201439&r2=201440&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Dominators.h?rev=201440&r1=201439&r2=201440&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/include/llvm/IR/Dominators.h (original)<br>
> +++ llvm/trunk/include/llvm/IR/Dominators.h Fri Feb 14 16:36:16 2014<br>
> @@ -34,6 +34,17 @@ namespace llvm {<br>
>  EXTERN_TEMPLATE_INSTANTIATION(class DomTreeNodeBase<BasicBlock>);<br>
>  EXTERN_TEMPLATE_INSTANTIATION(class DominatorTreeBase<BasicBlock>);<br>
><br>
> +#define LLVM_COMMA ,<br>
> +EXTERN_TEMPLATE_INSTANTIATION(<br>
> +    void llvm::Calculate<Function LLVM_COMMA BasicBlock *>(<br>
> +        DominatorTreeBase<typename GraphTraits<BasicBlock *>::NodeType> &DT<br>
> +            LLVM_COMMA Function &F));<br>
> +EXTERN_TEMPLATE_INSTANTIATION(void llvm::Calculate<<br>
> +    Function LLVM_COMMA Inverse<BasicBlock *> >(DominatorTreeBase<<br>
> +    typename GraphTraits<Inverse<BasicBlock *> >::NodeType> &DT LLVM_COMMA<br>
> +                                                    Function &F));<br>
> +#undef LLVM_COMMA<br>
> +<br>
>  typedef DomTreeNodeBase<BasicBlock> DomTreeNode;<br>
><br>
>  class BasicBlockEdge {<br>
><br>
> Modified: llvm/trunk/lib/IR/Dominators.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Dominators.cpp?rev=201440&r1=201439&r2=201440&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Dominators.cpp?rev=201440&r1=201439&r2=201440&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/IR/Dominators.cpp (original)<br>
> +++ llvm/trunk/lib/IR/Dominators.cpp Fri Feb 14 16:36:16 2014<br>
> @@ -64,6 +64,16 @@ bool BasicBlockEdge::isSingleEdge() cons<br>
>  TEMPLATE_INSTANTIATION(class llvm::DomTreeNodeBase<BasicBlock>);<br>
>  TEMPLATE_INSTANTIATION(class llvm::DominatorTreeBase<BasicBlock>);<br>
><br>
> +#define LLVM_COMMA ,<br>
> +TEMPLATE_INSTANTIATION(void llvm::Calculate<Function LLVM_COMMA BasicBlock *>(<br>
> +    DominatorTreeBase<typename GraphTraits<BasicBlock *>::NodeType> &DT<br>
> +        LLVM_COMMA Function &F));<br>
> +TEMPLATE_INSTANTIATION(void llvm::Calculate<<br>
> +    Function LLVM_COMMA Inverse<BasicBlock *> >(DominatorTreeBase<<br>
> +    typename GraphTraits<Inverse<BasicBlock *> >::NodeType> &DT LLVM_COMMA<br>
> +                                                    Function &F));<br>
> +#undef LLVM_COMMA<br>
> +<br>
>  // dominates - Return true if Def dominates a use in User. This performs<br>
>  // the special checks necessary if Def and User are in the same basic block.<br>
>  // Note that Def doesn't dominate a use in Def itself!<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>