http://llvm.org/bugs/show_bug.cgi?id=8596
Summary: MC Temporary Symbol Name Clash
Product: tools
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: llc
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Both CodeGen and MCAsmParser use MCContext::CreateTempSymbol() to create a
unique temporary symbol. The symbol is made unique by incrementing a UniqueID
counter.
But if the output of CodeGen is first emitted to a .s file, and then afterwards
assembled by llvm-mc, the UniqueID counter is not preserved, so naming clashes
can occur.
On X86-64 Linux ELF, you can demonstrate the problem using conflict.ll:
llc -filetype=asm conflict.ll -o conflict.s
llvm-mc -filetype=obj conflict.s -o conflict.o
The error:
conflict.s:23:1: error: invalid symbol redefinition
.Ltmp0:
^
Reason:
In llvm-mc, the "." expression is evaluated by creating a temporary symbol, but
the temporary name .Ltmp0 is already taken, since it was generated during the
call to llc.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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