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

            Bug ID: 38609
           Summary: [codeview] Clang needs to generate unique mangled
                    names for types in anonymous namespaces
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangb...@nondot.org
          Reporter: r...@google.com
                CC: brock.w...@intel.com, llvm-bugs@lists.llvm.org,
                    l...@inglorion.net

In CodeView, most struct types are referred to through forward declarations
that use the mangled name of the type. If the type's mangled name is not unique
across the whole project, the debugger will find the wrong one.

This issue was discussed as part of https://reviews.llvm.org/D45438, but so far
as I can tell nobody filed a bug for this.

This hasn't been a huge problem so far, but perhaps it's just because we don't
have enough debugger power users to report the issue. However, when type names
collide, debug info verification during ThinLTO now fails. I reported that as
https://bugs.llvm.org/show_bug.cgi?id=38608.

In order to avoid these problems, Clang needs to hash some kind of
deterministic module identifier into the way it mangles names in anonymous
namespaces. One reasonable thing to do would be to hash the compiler
invocation, or whatever parts are conveniently hashable, such as just the path
to the main source file.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to