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

            Bug ID: 33812
           Summary: ThinLTO importing function with inline ASM can't lead
                    to duplicate symbols
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: joker....@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 18803
  --> https://bugs.llvm.org/attachment.cgi?id=18803&action=edit
File with inline asm

For example the two attached files illustrate the issue. The inline ASM is
declaring a global symbol and after importing and inlining we end up with the
symbol redeclared. On Mac I see:

$ clang test_caller.cpp  test_asm.ll  -flto=thin
duplicate symbol __dtrace_probe in:
    /var/folders/yy/prvy9rf51xvbr26mdg9x00q1vtv3gs/T/cc-892b93.o/0.thinlto.o
    /var/folders/yy/prvy9rf51xvbr26mdg9x00q1vtv3gs/T/cc-892b93.o/1.thinlto.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)



Conservatively: we could disable the importing for functions that contains
inline ASM.

-- 
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