[llvm-bugs] [Bug 37754] New: MSVC doesn't mangle Obj-C generics

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 8 15:06:38 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37754

            Bug ID: 37754
           Summary: MSVC doesn't mangle Obj-C generics
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: compnerd at compnerd.org
          Reporter: smeenai at fb.com
                CC: dgregor at apple.com, duhowett at microsoft.com,
                    llvm-bugs at lists.llvm.org, rjmccall at apple.com,
                    rnk at google.com

% cat generics.mm
@class I<T>;
@class J;
template <class T> void f() {}
template void f<I<id>>();
template void f<I<J *>>();

% clang -cc1 -triple i686-windows-msvc -fobjc-runtime=ios-6.0 -emit-llvm \
    -o - generics.mm
generics.mm:3:25: error: definition with same mangled name '??$f at UI@@@@YAXXZ'
as another definition
template <class T> void f() {}
                        ^
generics.mm:3:25: note: previous definition is here
1 error generated.

As far as I can see, __kindof and non-__kindof generics are actually mangled
identically on Itanium (and considered to be the same type), so we don't need
to distinguish between those.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180608/a6b17969/attachment.html>


More information about the llvm-bugs mailing list