<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 6, 2011, at 1:08 PM, Nick Lewycky wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">The attached patch fixes PR10233 and is also available for review on <a href="http://codereview.appspot.com/4634122/">http://codereview.appspot.com/4634122/</a> as well as being attached.<div><br></div><div>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.</div>

<div><br></div><div>Please review!</div></blockquote><br></div><div>The added code in ASTContext.cpp and CodeGenModule.cpp is basically the same. How about abstracting this into a Decl or ASTContext routine "doesFunctionDeclatationForceExternallyVisibleDefinition()" (or something less long-winded)?</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div><br></body></html>