[LLVMbugs] [Bug 17918] New: COMDAT names don't match the ones use by MSVC

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 13 14:12:07 PST 2013


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

            Bug ID: 17918
           Summary: COMDAT names don't match the ones use by MSVC
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

given

inline  void __stdcall bar() {
}
void zed() {
  bar();
}


msvc produces:
SECTION HEADER #4
   .text name
         COMDAT; sym= "void __stdcall bar(void)" (?bar@@YGXXZ)

clang produces:

SECTION HEADER #2
      /4 name (.text$?bar@@YGXXZ)
...
      COMDAT; sym= "void __stdcall bar(void)" (?bar@@YGXXZ)


so the comdat uses the same symbol, but the section name is different.

It is similar for data. Given

template<class T>
struct foo {
  static int bar;
};
template<class T>
int foo<T>::bar;
int *f() {
  return &foo<int>::bar;
}

msvc produces

SECTION HEADER #4
    .bss name
...
         COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo at H@@2HA)

clang produces

SECTION HEADER #2
      /4 name (.bss$?bar@?$foo at H@@2HA)
...
COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo at H@@2HA)

-- 
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/20131113/70885aa6/attachment.html>


More information about the llvm-bugs mailing list