Skip to content

Commit 86ed347

Browse files
committed
[VectorUtils] Use namespace for InterleaveGroup template specialization.
llvm-svn: 346759
1 parent a4dc7fe commit 86ed347

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/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)