[LLVMbugs] [Bug 9364] New: clang should produce llvm.compiler.used with the symbols needed for inline asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 1 20:27:44 PST 2011


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

           Summary: clang should produce llvm.compiler.used with the
                    symbols needed for inline asm
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu


libLTO now has an streamer that lets it mark as used symbols needed by inline
asm. It would be nice to move that to a more central location so that clang
could do the same in a single compilation unit.

For example, there should be no need for the user to add __attribute__((used))
to bar in:

----------------------------
asm(".text\n foo: jmp bar");
int foo(void);
static int __attribute__((used)) bar(void) {
        return 42;
}
int main(void) {
        return foo();
}
---------------------------

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



More information about the llvm-bugs mailing list