diff --git a/include/llvm/IR/Dominators.h b/include/llvm/IR/Dominators.h index 9090457bcf0..0faa3b886fe 100644 --- a/include/llvm/IR/Dominators.h +++ b/include/llvm/IR/Dominators.h @@ -34,6 +34,17 @@ namespace llvm { EXTERN_TEMPLATE_INSTANTIATION(class DomTreeNodeBase); EXTERN_TEMPLATE_INSTANTIATION(class DominatorTreeBase); +#define LLVM_COMMA , +EXTERN_TEMPLATE_INSTANTIATION( + void llvm::Calculate( + DominatorTreeBase::NodeType> &DT + LLVM_COMMA Function &F)); +EXTERN_TEMPLATE_INSTANTIATION(void llvm::Calculate< + Function LLVM_COMMA Inverse >(DominatorTreeBase< + typename GraphTraits >::NodeType> &DT LLVM_COMMA + Function &F)); +#undef LLVM_COMMA + typedef DomTreeNodeBase DomTreeNode; class BasicBlockEdge { diff --git a/lib/IR/Dominators.cpp b/lib/IR/Dominators.cpp index 8fa742f745a..baa6019098d 100644 --- a/lib/IR/Dominators.cpp +++ b/lib/IR/Dominators.cpp @@ -64,6 +64,16 @@ bool BasicBlockEdge::isSingleEdge() const { TEMPLATE_INSTANTIATION(class llvm::DomTreeNodeBase); TEMPLATE_INSTANTIATION(class llvm::DominatorTreeBase); +#define LLVM_COMMA , +TEMPLATE_INSTANTIATION(void llvm::Calculate( + DominatorTreeBase::NodeType> &DT + LLVM_COMMA Function &F)); +TEMPLATE_INSTANTIATION(void llvm::Calculate< + Function LLVM_COMMA Inverse >(DominatorTreeBase< + typename GraphTraits >::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!