http://llvm.org/bugs/show_bug.cgi?id=19597

            Bug ID: 19597
           Summary: Visibility attribute ignored on variable templates
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

consider:
template <typename T> __attribute__((visibility("hidden"))) const int &x = 4;
template const int &x<void>;

codgen looks bad:
@_Z1xIvE = weak_odr constant i32* @_ZGR1xIvE, align 8

however, it works fine for non-static data members, their close relatives:
template <typename T> struct S {
  __attribute__((visibility("hidden"))) static const int &x;
};
template <typename T> const int &S<T>::x = 4;
template const int &S<void>::x;

@_ZN1SIvE1xE = weak_odr hidden constant i32* @_ZGRN1SIvE1xE, align 8

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to