<div dir="ltr">+rsmith<br><div><br></div><div>Hi All,</div><div><br></div><div>Sorry, I'm not actually sure why this fix is correct.I stole both the fix and the comment from a similar one on L150 of the module map left by Richard Smith.</div><div><br></div><div>/Eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 25, 2018 at 8:36 PM Shuai Wang <<a href="mailto:shuaiwang@google.com">shuaiwang@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd like to understand this better as well, in particular what would be a proper fix?</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 25, 2018 at 2:15 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">+Shuai Wang<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 25, 2018 at 2:14 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Eric - thanks for the fix - but could you explain the issue here in a bit more detail, as I'm a bit confused (& really interested in understanding any layering problems in LLVM - and fixing them/making sure they're fixed/holding the line/etc)<br><br>What do you mean by "pull all of the AST matchers library into clang" - how does including a header ever add a link dependency?<br><br>- Dave</div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Sep 22, 2018 at 5:49 PM Eric Fiselier via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ericwf<br>
Date: Sat Sep 22 17:48:05 2018<br>
New Revision: 342827<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342827&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=342827&view=rev</a><br>
Log:<br>
Fix modules build with shared library.<br>
<br>
r341994 caused clangAnalysis to pull all of the AST matchers<br>
library into clang. Due to inline key functions in the headers,<br>
importing the AST matchers library gives a link dependency on the<br>
AST matchers (and thus the AST), which clang should not<br>
have.<br>
<br>
This patch works around the issues by excluding the offending<br>
libclangAnalysis header in the modulemap.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/module.modulemap<br>
<br>
Modified: cfe/trunk/include/clang/module.modulemap<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=342827&r1=342826&r2=342827&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/module.modulemap?rev=342827&r1=342826&r2=342827&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/module.modulemap (original)<br>
+++ cfe/trunk/include/clang/module.modulemap Sat Sep 22 17:48:05 2018<br>
@@ -5,6 +5,12 @@ module Clang_Analysis {<br>
   textual header "Analysis/Analyses/ThreadSafetyOps.def"<br>
<br>
   module * { export * }<br>
+<br>
+  // FIXME: Exclude these headers to avoid pulling all of the AST matchers<br>
+  // library into clang. Due to inline key functions in the headers,<br>
+  // importing the AST matchers library gives a link dependency on the AST<br>
+  // matchers (and thus the AST), which clang-format should not have.<br>
+  exclude header "Analysis/Analyses/ExprMutationAnalyzer.h"<br>
 }<br>
<br>
 module Clang_AST {<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div></div></blockquote></div></div>
</blockquote></div>
</blockquote></div>