[LLVMdev] inlining hint
Óscar Fuentes
ofv at wanadoo.es
Wed Aug 26 11:26:06 PDT 2009
Dale Johannesen <dalej at apple.com> writes:
[snip]
> Per the language standard, A and B are semantically identical, both
> "inline". It's been suggested that we should omit the inlinehint on
> A, on the grounds that many C++ programmers do not know this, and
> therefore misuse the construct. I want to get some other views on
> this. Do you think it's a good idea?
> (For those of you who consider yourselves C++ programmers - and not FE
> language lawyers, who are supposed to know what the standard says -
> did you know this?)
Maybe I'm not understanding your question, but for me methods defined
inside the class definition are inline and I would be dissapointed if
the compiler thinks otherwise (unless it knows that inlining would cause
inferior performance or is technically unfeasible: the Borland compiler
used to refuse inlining on some circunstances, such as when the function
contained a `throw').
After all, `inline' is like `register': just a wish that the compiler
can ignore, but a compiler shouldn't disregard the standard just for not
creating surprises to uninformed users, IMO.
--
Óscar
More information about the llvm-dev
mailing list