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

            Bug ID: 23850
           Summary: inlined symbols remain undefined in object code
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

When using `-ON` where `N < 2` the generated object code fails to either inline
functions or generate code for said functions:

```
% clang -O0 -c bug.c
% objdump -t bug.o

bug.o:     file format elf64-x86-64

SYMBOL TABLE:
0000000000000000 l    df *ABS*  0000000000000000 bug.c
0000000000000000 l    d  .text  0000000000000000 .text
0000000000000000 l    d  .data  0000000000000000 .data
0000000000000000 l    d  .bss   0000000000000000 .bss
0000000000000000 l    d  .comment       0000000000000000 .comment
0000000000000000 l    d  .note.GNU-stack        0000000000000000
.note.GNU-stack
0000000000000000 l    d  .eh_frame      0000000000000000 .eh_frame
0000000000000000 g     F .text  000000000000000d g
0000000000000000         *UND*  0000000000000000 f


[tommd@vodka]/tmp% cat bug.c
inline void f()
{}

void g()
{
    f();
}
```

Notice how `f` is marked `inline` then appears as `UND` in the objdump.

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

Reply via email to