[llvm] r201440 - Add extern template instantiations of llvm::Calculate.
Demikhovsky, Elena
elena.demikhovsky at intel.com
Sun Feb 16 01:34:31 PST 2014
I still have this problem:
/lib/IR/Dominators.cpp:68: error: using 'typename' outside of template
/lib/IR/Dominators.cpp:71: error: using 'typename' outside of template
- Elena
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of David Blaikie
Sent: Saturday, February 15, 2014 02:41
To: Lang Hames
Cc: Commit Messages and Patches for LLVM
Subject: Re: [llvm] r201440 - Add extern template instantiations of llvm::Calculate.
Hopefully fixed by removing the unnecessary 'typename' in r201450.
On Fri, Feb 14, 2014 at 4:34 PM, Lang Hames <lhames at gmail.com<mailto:lhames at gmail.com>> wrote:
Hi Rafael,
My compiler is warning on this patch: "'typename' occurs outside of a
template [-W++11-extensions]".
This may need to be reverted until we make the switch to C++11.
Cheers,
Lang.
On Fri, Feb 14, 2014 at 2:36 PM, Rafael Espindola
<rafael.espindola at gmail.com<mailto:rafael.espindola at gmail.com>> wrote:
> Author: rafael
> Date: Fri Feb 14 16:36:16 2014
> New Revision: 201440
>
> URL: http://llvm.org/viewvc/llvm-project?rev=201440&view=rev
> Log:
> Add extern template instantiations of llvm::Calculate.
>
> This should be a small build time improvement in general and fixes
> the build on OS X with -DBUILD_SHARED_LIBS=ON.
>
> The issue is that not all users are including GenericDomTreeConstruction.h,
> causing undefined references when ld64 managed to hide the
> linkonce_odr symbols.
>
> Modified:
> llvm/trunk/include/llvm/IR/Dominators.h
> llvm/trunk/lib/IR/Dominators.cpp
>
> Modified: llvm/trunk/include/llvm/IR/Dominators.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Dominators.h?rev=201440&r1=201439&r2=201440&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/IR/Dominators.h (original)
> +++ llvm/trunk/include/llvm/IR/Dominators.h Fri Feb 14 16:36:16 2014
> @@ -34,6 +34,17 @@ namespace llvm {
> EXTERN_TEMPLATE_INSTANTIATION(class DomTreeNodeBase<BasicBlock>);
> EXTERN_TEMPLATE_INSTANTIATION(class DominatorTreeBase<BasicBlock>);
>
> +#define LLVM_COMMA ,
> +EXTERN_TEMPLATE_INSTANTIATION(
> + void llvm::Calculate<Function LLVM_COMMA BasicBlock *>(
> + DominatorTreeBase<typename GraphTraits<BasicBlock *>::NodeType> &DT
> + LLVM_COMMA Function &F));
> +EXTERN_TEMPLATE_INSTANTIATION(void llvm::Calculate<
> + Function LLVM_COMMA Inverse<BasicBlock *> >(DominatorTreeBase<
> + typename GraphTraits<Inverse<BasicBlock *> >::NodeType> &DT LLVM_COMMA
> + Function &F));
> +#undef LLVM_COMMA
> +
> typedef DomTreeNodeBase<BasicBlock> DomTreeNode;
>
> class BasicBlockEdge {
>
> Modified: llvm/trunk/lib/IR/Dominators.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Dominators.cpp?rev=201440&r1=201439&r2=201440&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/Dominators.cpp (original)
> +++ llvm/trunk/lib/IR/Dominators.cpp Fri Feb 14 16:36:16 2014
> @@ -64,6 +64,16 @@ bool BasicBlockEdge::isSingleEdge() cons
> TEMPLATE_INSTANTIATION(class llvm::DomTreeNodeBase<BasicBlock>);
> TEMPLATE_INSTANTIATION(class llvm::DominatorTreeBase<BasicBlock>);
>
> +#define LLVM_COMMA ,
> +TEMPLATE_INSTANTIATION(void llvm::Calculate<Function LLVM_COMMA BasicBlock *>(
> + DominatorTreeBase<typename GraphTraits<BasicBlock *>::NodeType> &DT
> + LLVM_COMMA Function &F));
> +TEMPLATE_INSTANTIATION(void llvm::Calculate<
> + Function LLVM_COMMA Inverse<BasicBlock *> >(DominatorTreeBase<
> + typename GraphTraits<Inverse<BasicBlock *> >::NodeType> &DT LLVM_COMMA
> + Function &F));
> +#undef LLVM_COMMA
> +
> // dominates - Return true if Def dominates a use in User. This performs
> // the special checks necessary if Def and User are in the same basic block.
> // Note that Def doesn't dominate a use in Def itself!
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140216/f9e99f0e/attachment.html>
More information about the llvm-commits
mailing list