[cfe-commits] patch: redeclaring an inline function external should trigger emission

Nick Lewycky nlewycky at google.com
Wed Jul 6 13:08:21 PDT 2011


The attached patch fixes PR10233 and is also available for review on
http://codereview.appspot.com/4634122/ as well as being attached.

The problem is that codegen knows it doesn't need to emit the inline
function when it first encounters it, then when it sees the redeclaration it
sees no definition on it and ignores that. The fix works by double-checking
on each redeclaration (in C99 mode without gnu inline semantics) that this
isn't the first redecl of an inline method. If it is, then we remove it from
DeferredDecls (it won't be in DeferredDeclsToEmit), and emit it immediately.

Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110706/0237cd9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr10233-2.patch
Type: text/x-patch
Size: 3969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110706/0237cd9c/attachment.bin>


More information about the cfe-commits mailing list