<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 16, 2015 at 3:52 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">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"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 16, 2015 at 10:19 AM, Eric Christopher via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span><div dir="ltr">On Fri, Oct 16, 2015 at 10:18 AM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@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"><div class="gmail_quote"><div dir="ltr">On Fri, Oct 16, 2015 at 10:14 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Oct 16, 2015, at 9:56 AM, Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Eh? Why?</div></div></blockquote><div><br></div><div>The file forward-declares DebugLocStream and then uses the inner type (DebugLocStream::ListBuilder *) in an argument list. As noted in the commit message, clang complains about this when building with modules.</div><div><br></div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>This seems odd.</div></div></div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div></div><div>I’m unsure whether this is supposed to work or if I was just working around a bug in clang. If this is indeed a clang bug, we should fix it instead.</div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>Right. This is what I'm asking. </div></div></div></blockquote><div><br></div></span><div>And if it isn't going to work in modules it should probably warn/error normally as well.</div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Modules allows us to find errors we can't diagnose without them.<br><br>In this case, chances are this header is included in a context that already included DebugLocStream.h before it - the header wasn't standalone. In a non-modular build we don't diagnose non-standalone headers.<br><br></div></div></div></div></blockquote><div><br></div><div>*nod* That makes perfect sense, just wasn't clear from the commit message and no one has tracked down if that is the case or not :)</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Only once you go to build the header as a separate module (or submodule) do you see this.<br><br>So I /think/ this expected behavior & the sort of thing we expect the modules buildbot to find & cause us to fix.<br><br>(cc'd Richard in case I've missed something here)<br><br>- Dave</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>-eric</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>-eric</div></div></div><div dir="ltr"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><div>-- adrian</div></div></div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>-eric</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 15, 2015 at 2:00 PM Adrian Prantl via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-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: adrian<br>
Date: Thu Oct 15 15:58:55 2015<br>
New Revision: 250459<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=250459&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=250459&view=rev</a><br>
Log:<br>
Replace a forward declaration with an #include.<br>
When building with modules the forward-declared inner class<br>
DebugLocStream::ListBuilder causes clang to fall over.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=250459&r1=250458&r2=250459&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=250459&r1=250458&r2=250459&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h Thu Oct 15 15:58:55 2015<br>
@@ -9,6 +9,8 @@<br>
<br>
 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H<br>
 #define LLVM_LIB_CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H<br>
+<br>
+#include "DebugLocStream.h"<br>
 #include "llvm/ADT/SmallString.h"<br>
 #include "llvm/IR/Constants.h"<br>
 #include "llvm/IR/DebugInfo.h"<br>
@@ -17,7 +19,6 @@<br>
<br>
 namespace llvm {<br>
 class AsmPrinter;<br>
-class DebugLocStream;<br>
<br>
 /// \brief This struct describes location entries emitted in the .debug_loc<br>
 /// section.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>
</div></blockquote></div></div></blockquote></div></div></blockquote></div></div></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div></div></div></blockquote></div></div>