[llvm] r346759 - [VectorUtils] Use namespace for InterleaveGroup template specialization.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 08:26:35 PST 2018


Author: fhahn
Date: Tue Nov 13 08:26:34 2018
New Revision: 346759

URL: http://llvm.org/viewvc/llvm-project?rev=346759&view=rev
Log:
[VectorUtils] Use namespace for InterleaveGroup template specialization.

Modified:
    llvm/trunk/lib/Analysis/VectorUtils.cpp

Modified: llvm/trunk/lib/Analysis/VectorUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/VectorUtils.cpp?rev=346759&r1=346758&r2=346759&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/VectorUtils.cpp (original)
+++ llvm/trunk/lib/Analysis/VectorUtils.cpp Tue Nov 13 08:26:34 2018
@@ -966,6 +966,12 @@ void InterleavedAccessInfo::invalidateGr
   RequiresScalarEpilogue = false;
 }
 
+template <typename InstT>
+void InterleaveGroup<InstT>::addMetadata(InstT *NewInst) const {
+  llvm_unreachable("addMetadata can only be used for Instruction");
+}
+
+namespace llvm {
 template <>
 void InterleaveGroup<Instruction>::addMetadata(Instruction *NewInst) const {
   SmallVector<Value *, 4> VL;
@@ -973,8 +979,4 @@ void InterleaveGroup<Instruction>::addMe
                  [](std::pair<int, Instruction *> p) { return p.second; });
   propagateMetadata(NewInst, VL);
 }
-
-template <typename InstT>
-void InterleaveGroup<InstT>::addMetadata(InstT *NewInst) const {
-  llvm_unreachable("addMetadata can only be used for Instruction");
 }




More information about the llvm-commits mailing list