From 51f514d853183f226af7a7c68730e4a0507c171f Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Fri, 30 Sep 2016 16:47:43 +0000 Subject: [PATCH] [Support] Compile fix for gcc. NFC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit gcc 5.4 insists on template specialization to be in a namespace polly { ... } block, instead of being prefixed with 'polly::'. Error message: root/src/llvm/tools/polly/lib/Support/GICHelper.cpp:203:54: error: specialization of ‘template void polly::IslPtr::dump() const’ in different namespace [-fpermissive] template <> void polly::IslPtr::dump() const { \ ^ msvc14 and clang 3.8 did not complain. llvm-svn: 282874 --- polly/lib/Support/GICHelper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/polly/lib/Support/GICHelper.cpp b/polly/lib/Support/GICHelper.cpp index 58c3ba5..82c07ca 100644 --- a/polly/lib/Support/GICHelper.cpp +++ b/polly/lib/Support/GICHelper.cpp @@ -200,13 +200,14 @@ std::string polly::getIslCompatibleName(const std::string &Prefix, } #define DEFINE_ISLPTR(TYPE) \ - template <> void polly::IslPtr::dump() const { \ + template <> void IslPtr::dump() const { \ isl_##TYPE##_dump(Obj); \ } \ - template <> void polly::NonowningIslPtr::dump() const { \ + template <> void NonowningIslPtr::dump() const { \ isl_##TYPE##_dump(Obj); \ } +namespace polly { DEFINE_ISLPTR(val) DEFINE_ISLPTR(space) DEFINE_ISLPTR(basic_map) @@ -220,6 +221,7 @@ DEFINE_ISLPTR(pw_aff) // DEFINE_ISLPTR(union_pw_aff) /* There is no isl_union_pw_aff_dump() */ DEFINE_ISLPTR(multi_union_pw_aff) DEFINE_ISLPTR(union_pw_multi_aff) +} void polly::foreachElt(NonowningIslPtr UMap, const std::function Map)> &F) { -- 2.7.4