From 86ed347bcd2c4ef8c12a38473bfc14d7db70f3db Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Tue, 13 Nov 2018 16:26:34 +0000 Subject: [VectorUtils] Use namespace for InterleaveGroup template specialization. llvm-svn: 346759 --- llvm/lib/Analysis/VectorUtils.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Analysis/VectorUtils.cpp') diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 9c3bf7df89b..9ebb01684c8 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -966,6 +966,12 @@ void InterleavedAccessInfo::invalidateGroupsRequiringScalarEpilogue() { RequiresScalarEpilogue = false; } +template +void InterleaveGroup::addMetadata(InstT *NewInst) const { + llvm_unreachable("addMetadata can only be used for Instruction"); +} + +namespace llvm { template <> void InterleaveGroup::addMetadata(Instruction *NewInst) const { SmallVector VL; @@ -973,8 +979,4 @@ void InterleaveGroup::addMetadata(Instruction *NewInst) const { [](std::pair p) { return p.second; }); propagateMetadata(NewInst, VL); } - -template -void InterleaveGroup::addMetadata(InstT *NewInst) const { - llvm_unreachable("addMetadata can only be used for Instruction"); } -- cgit v1.2.3