<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yes, that's because I forgot to git-add the actual testcase :-)<div class="">It came commits after this one.</div><div class=""><br class=""></div><div class="">-- adrian<br class=""><div><blockquote type="cite" class=""><div class="">On Aug 22, 2016, at 11:00 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Generally I'd expect a test case to exercise/demonstrate the behavior that was previously hidden behind an assertion. (put another way: "we expect something specific to happen, not just for clang not to assert/crash")</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Aug 22, 2016 at 3:32 PM Adrian Prantl via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="">cfe-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: adrian<br class="">
Date: Mon Aug 22 17:23:58 2016<br class="">
New Revision: 279485<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279485&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=279485&view=rev</a><br class="">
Log:<br class="">
Module debug info: Don't assert when encountering an incomplete definition<br class="">
in isDefinedInClangModule() and assume that the incomplete definition<br class="">
is not defined in the module.<br class="">
<br class="">
This broke the -gmodules self host recently.<br class="">
<a href="rdar://problem/27894367" class="">rdar://problem/27894367</a><br class="">
<br class="">
Added:<br class="">
cfe/trunk/test/Modules/Inputs/DebugNestedA.h<br class="">
cfe/trunk/test/Modules/Inputs/DebugNestedB.h<br class="">
Modified:<br class="">
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br class="">
cfe/trunk/test/Modules/Inputs/module.map<br class="">
<br class="">
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=279485&r1=279484&r2=279485&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=279485&r1=279484&r2=279485&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)<br class="">
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Aug 22 17:23:58 2016<br class="">
@@ -1655,7 +1655,8 @@ static bool isDefinedInClangModule(const<br class="">
if (!RD->isExternallyVisible() && RD->getName().empty())<br class="">
return false;<br class="">
if (auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD)) {<br class="">
- assert(CXXDecl->isCompleteDefinition() && "incomplete record definition");<br class="">
+ if (!CXXDecl->isCompleteDefinition())<br class="">
+ return false;<br class="">
auto TemplateKind = CXXDecl->getTemplateSpecializationKind();<br class="">
if (TemplateKind != TSK_Undeclared) {<br class="">
// This is a template, check the origin of the first member.<br class="">
<br class="">
Added: cfe/trunk/test/Modules/Inputs/DebugNestedA.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/DebugNestedA.h?rev=279485&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/DebugNestedA.h?rev=279485&view=auto</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/test/Modules/Inputs/DebugNestedA.h (added)<br class="">
+++ cfe/trunk/test/Modules/Inputs/DebugNestedA.h Mon Aug 22 17:23:58 2016<br class="">
@@ -0,0 +1,8 @@<br class="">
+/* -*- C++ -*- */<br class="">
+template <typename T> class Base {};<br class="">
+template <typename T> struct A : public Base<A<T>> {<br class="">
+ void f();<br class="">
+};<br class="">
+<br class="">
+class F {};<br class="">
+typedef A<F> AF;<br class="">
<br class="">
Added: cfe/trunk/test/Modules/Inputs/DebugNestedB.h<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/DebugNestedB.h?rev=279485&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/DebugNestedB.h?rev=279485&view=auto</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/test/Modules/Inputs/DebugNestedB.h (added)<br class="">
+++ cfe/trunk/test/Modules/Inputs/DebugNestedB.h Mon Aug 22 17:23:58 2016<br class="">
@@ -0,0 +1,7 @@<br class="">
+/* -*- C++ -*- */<br class="">
+#include "DebugNestedA.h"<br class="">
+class C {<br class="">
+ void run(AF &af) {<br class="">
+ af.f();<br class="">
+ }<br class="">
+};<br class="">
<br class="">
Modified: cfe/trunk/test/Modules/Inputs/module.map<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/module.map?rev=279485&r1=279484&r2=279485&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/Inputs/module.map?rev=279485&r1=279484&r2=279485&view=diff</a><br class="">
==============================================================================<br class="">
--- cfe/trunk/test/Modules/Inputs/module.map (original)<br class="">
+++ cfe/trunk/test/Modules/Inputs/module.map Mon Aug 22 17:23:58 2016<br class="">
@@ -422,3 +422,13 @@ module MacroFabs1 {<br class="">
module DiagOutOfDate {<br class="">
header "DiagOutOfDate.h"<br class="">
}<br class="">
+<br class="">
+module DebugNestedA {<br class="">
+ header "DebugNestedA.h"<br class="">
+ export *<br class="">
+}<br class="">
+<br class="">
+module DebugNestedB {<br class="">
+ header "DebugNestedB.h"<br class="">
+ export *<br class="">
+}<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>