You can use -emit-llvm-only.<span></span><br><br>On Tuesday, July 2, 2013, Serge Pavlov wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: sepavloff<br>
Date: Tue Jul 2 12:31:56 2013<br>
New Revision: 185446<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=185446&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=185446&view=rev</a><br>
Log:<br>
Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.<br>
<br>
Added:<br>
cfe/trunk/test/CodeGen/PR15826.c<br>
Modified:<br>
cfe/trunk/lib/Sema/SemaDecl.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=185446&r1=185445&r2=185446&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=185446&r1=185445&r2=185446&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Tue Jul 2 12:31:56 2013<br>
@@ -10483,7 +10483,8 @@ void Sema::ActOnTagFinishDefinition(Scop<br>
Tag->setTopLevelDeclInObjCContainer();<br>
<br>
// Notify the consumer that we've defined a tag.<br>
- Consumer.HandleTagDeclDefinition(Tag);<br>
+ if (!Tag->isInvalidDecl())<br>
+ Consumer.HandleTagDeclDefinition(Tag);<br>
}<br>
<br>
void Sema::ActOnObjCContainerFinishDefinition() {<br>
<br>
Added: cfe/trunk/test/CodeGen/PR15826.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/PR15826.c?rev=185446&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/PR15826.c?rev=185446&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/PR15826.c (added)<br>
+++ cfe/trunk/test/CodeGen/PR15826.c Tue Jul 2 12:31:56 2013<br>
@@ -0,0 +1,19 @@<br>
+// RUN: %clang_cc1 -verify -emit-llvm %s<br>
+<br>
+/* Testcase for PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout */<br>
+struct sysctl_req {<br>
+ struct aiocblist *p_aio;<br>
+};<br>
+<br>
+struct sysctl_oid {<br>
+ int (*oid_handler)(struct sysctl_req *req);<br>
+};<br>
+<br>
+static struct sysctl_oid sysctl___kern_features_aio;<br>
+<br>
+static void const *const __set_sysctl_set_sym_sysctl___kern_features_aio<br>
+ __attribute__((__used__)) = &sysctl___kern_features_aio;<br>
+<br>
+struct aiocblist {<br>
+ struct aiocb uaiocb; // expected-error {{field has incomplete type}} expected-note {{forward declaration}}<br>
+};<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'cfe-commits@cs.uiuc.edu')">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote>