[llvm] 1d3cd71 - Fix GCC error: specialization of 'template<class LeafTy> struct llvm::LinearPolyBaseTypeTraits' in different namespace

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 07:55:48 PST 2020


Author: Hans Wennborg
Date: 2020-11-03T16:55:32+01:00
New Revision: 1d3cd7172b2fb62a41fb962bc506913e2a6e8a8e

URL: https://github.com/llvm/llvm-project/commit/1d3cd7172b2fb62a41fb962bc506913e2a6e8a8e
DIFF: https://github.com/llvm/llvm-project/commit/1d3cd7172b2fb62a41fb962bc506913e2a6e8a8e.diff

LOG: Fix GCC error: specialization of 'template<class LeafTy> struct llvm::LinearPolyBaseTypeTraits' in different namespace

Added: 
    

Modified: 
    llvm/unittests/Support/LinearPolyBaseTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/LinearPolyBaseTest.cpp b/llvm/unittests/Support/LinearPolyBaseTest.cpp
index 85507012003d..407e9b6ae80f 100644
--- a/llvm/unittests/Support/LinearPolyBaseTest.cpp
+++ b/llvm/unittests/Support/LinearPolyBaseTest.cpp
@@ -12,10 +12,13 @@
 using namespace llvm;
 
 class Poly3D;
-template <> struct llvm::LinearPolyBaseTypeTraits<Poly3D> {
+
+namespace llvm {
+template <> struct LinearPolyBaseTypeTraits<Poly3D> {
   using ScalarTy = int64_t;
   static const unsigned Dimensions = 3;
 };
+}
 
 using Poly3DBase = LinearPolyBase<Poly3D>;
 class Poly3D : public Poly3DBase {
@@ -80,10 +83,12 @@ TEST(LinearPolyBase, Poly3D_Invert) {
 }
 
 class Univariate3D;
-template <> struct llvm::LinearPolyBaseTypeTraits<Univariate3D> {
+namespace llvm {
+template <> struct LinearPolyBaseTypeTraits<Univariate3D> {
   using ScalarTy = int64_t;
   static const unsigned Dimensions = 3;
 };
+}
 
 using Univariate3DBase = UnivariateLinearPolyBase<Univariate3D>;
 class Univariate3D : public Univariate3DBase {


        


More information about the llvm-commits mailing list