[LLVMbugs] [Bug 2933] New: Inline attribute on function gives the wrong linkage attribute in LLVM IR

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Oct 22 15:14:51 PDT 2008


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

           Summary: Inline attribute on function gives the wrong linkage
                    attribute in LLVM IR
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Basic
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nadav256 at gmail.com
                CC: llvmbugs at cs.uiuc.edu


When I define an inlined C function like:  "inline int f(...) {...}"   clang
compiles it to the following LLVM IR:

define weak i32 @f(i32 %input) nounwind {  ...

This actually prevents f from being inlined. 

llvm-gcc will create the correct result:

define linkonce i32 @f(i32 %input) { ....

which will be inlined correctly.


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