[polly] r282874 - [Support] Compile fix for gcc. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 09:47:43 PDT 2016
Author: meinersbur
Date: Fri Sep 30 11:47:43 2016
New Revision: 282874
URL: http://llvm.org/viewvc/llvm-project?rev=282874&view=rev
Log:
[Support] Compile fix for gcc. NFC.
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<class T> void polly::IslPtr<T>::dump() const’ in different namespace [-fpermissive]
template <> void polly::IslPtr<isl_##TYPE>::dump() const { \
^
msvc14 and clang 3.8 did not complain.
Modified:
polly/trunk/lib/Support/GICHelper.cpp
Modified: polly/trunk/lib/Support/GICHelper.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/GICHelper.cpp?rev=282874&r1=282873&r2=282874&view=diff
==============================================================================
--- polly/trunk/lib/Support/GICHelper.cpp (original)
+++ polly/trunk/lib/Support/GICHelper.cpp Fri Sep 30 11:47:43 2016
@@ -200,13 +200,14 @@ std::string polly::getIslCompatibleName(
}
#define DEFINE_ISLPTR(TYPE) \
- template <> void polly::IslPtr<isl_##TYPE>::dump() const { \
+ template <> void IslPtr<isl_##TYPE>::dump() const { \
isl_##TYPE##_dump(Obj); \
} \
- template <> void polly::NonowningIslPtr<isl_##TYPE>::dump() const { \
+ template <> void NonowningIslPtr<isl_##TYPE>::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<isl_union_map> UMap,
const std::function<void(IslPtr<isl_map> Map)> &F) {
More information about the llvm-commits
mailing list