Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 9693395

Browse files
committed
[VectorUtils] Use namespace for InterleaveGroup template specialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346759 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 8f37d00 commit 9693395

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/Analysis/VectorUtils.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,15 +966,17 @@ void InterleavedAccessInfo::invalidateGroupsRequiringScalarEpilogue() {
966966
RequiresScalarEpilogue = false;
967967
}
968968

969+
template <typename InstT>
970+
void InterleaveGroup<InstT>::addMetadata(InstT *NewInst) const {
971+
llvm_unreachable("addMetadata can only be used for Instruction");
972+
}
973+
974+
namespace llvm {
969975
template <>
970976
void InterleaveGroup<Instruction>::addMetadata(Instruction *NewInst) const {
971977
SmallVector<Value *, 4> VL;
972978
std::transform(Members.begin(), Members.end(), std::back_inserter(VL),
973979
[](std::pair<int, Instruction *> p) { return p.second; });
974980
propagateMetadata(NewInst, VL);
975981
}
976-
977-
template <typename InstT>
978-
void InterleaveGroup<InstT>::addMetadata(InstT *NewInst) const {
979-
llvm_unreachable("addMetadata can only be used for Instruction");
980982
}

0 commit comments

Comments
 (0)