<p dir="ltr">OK, thanks for clarification. I will be able to make functions in this header just inline tomorrow, if you won't beat me in it :)</p>
<div class="gmail_quote">On 27 Feb 2014 23:05, "Rafael Espíndola" <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
>> > +static inline std::pair<symbol_iterator, symbol_iterator><br>
>><br>
>> Why static?<br>
><br>
><br>
> Mostly for consistency with other similar functions in this header. Why is<br>
> static bad here<br>
> (i.e. why do we want to emit this function in any module that includes<br>
> ELFOjbectFile.h)?<br>
<br>
With just inline we will emit it only if it is used. And will emit it<br>
with linkonce_odr, so that it can be merged by the linker.<br>
<br>
For example, given a c++ file with<br>
<br>
inline void foo1() {}<br>
inline void foo2() {}<br>
static inline void bar1() {}<br>
static inline void bar2() {}<br>
void zed() {<br>
  foo1();<br>
  bar1();<br>
}<br>
<br>
clang produces<br>
<br>
define void @_Z3zedv() #0 {<br>
define linkonce_odr void @_Z4foo1v() #1 {<br>
define internal void @_ZL4bar1v() #1 {<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div>