<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 31 January 2018 at 16:42, Shoaib Meenai via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-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 bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="m_-4444345358604898380WordSection1">
<p class="MsoNormal">Is this viable for backporting to 6.0? It fixes a bug that's been hit in various forms by quite a few people:
<a href="https://bugs.llvm.org/show_bug.cgi?id=36181" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=36181</a>,
<a href="https://bugs.llvm.org/show_bug.cgi?id=35473" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=35473</a>, and
<a href="https://bugs.llvm.org/show_bug.cgi?id=35939" target="_blank">https://bugs.llvm.org/show_<wbr>bug.cgi?id=35939</a>.</p></div></div></blockquote><div><br></div><div>I'd be OK with that once it's had a few days to work its way through various automated build systems.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" lang="EN-US" link="blue" vlink="purple"><div class="m_-4444345358604898380WordSection1"><p class="MsoNormal"> </p><p class="MsoNormal"><u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">cfe-commits <<a href="mailto:cfe-commits-bounces@lists.llvm.org" target="_blank">cfe-commits-bounces@lists.<wbr>llvm.org</a>> on behalf of Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>><br>
<b>Reply-To: </b>Richard Smith <<a href="mailto:richard-llvm@metafoo.co.uk" target="_blank">richard-llvm@metafoo.co.uk</a>><br>
<b>Date: </b>Wednesday, January 31, 2018 at 4:32 PM<br>
<b>To: </b>"<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>" <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>><br>
<b>Subject: </b>r323935 - PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.<u></u><u></u></span></p>
</div><span class="">
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Author: rsmith<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Date: Wed Jan 31 16:28:36 2018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">New Revision: 323935<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
</span><div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D323935-26view-3Drev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=gXiqdj7RcmFitXxzq_T6trCkulPJ1hKO9JTh4N1W1Ds&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject-<wbr>3Frev-3D323935-26view-3Drev&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>gXiqdj7RcmFitXxzq_<wbr>T6trCkulPJ1hKO9JTh4N1W1Ds&e=</a><u></u><u></u></p>
</div><span class="">
<div>
<p class="MsoNormal" style="margin-left:.5in">Log:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Previously, friend function definitions within class templates slipped through<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">the gaps and caused the MS mangler to assert.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Added:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-emit-dependent.<wbr>cpp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> cfe/trunk/include/clang/<wbr>AST/DeclBase.h<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> cfe/trunk/lib/AST/<wbr>DeclBase.cpp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> cfe/trunk/lib/CodeGen/<wbr>CodeGenModule.cpp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified: cfe/trunk/include/clang/AST/<wbr>DeclBase.h<u></u><u></u></p>
</div>
</span><div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_include_clang_AST_DeclBase.h-3Frev-3D323935-26r1-3D323934-26r2-3D323935-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=IdB02f1U8VHa1i4Dvuj1BkcyoWf9sYvY3xE1L8bzfM0&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject_cfe_<wbr>trunk_include_clang_AST_<wbr>DeclBase.h-3Frev-3D323935-<wbr>26r1-3D323934-26r2-3D323935-<wbr>26view-3Ddiff&d=DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>IdB02f1U8VHa1i4Dvuj1BkcyoWf9sY<wbr>vY3xE1L8bzfM0&e=</a><u></u><u></u></p>
</div><span class="">
<div>
<p class="MsoNormal" style="margin-left:.5in">==============================<wbr>==============================<wbr>==================<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">--- cfe/trunk/include/clang/AST/<wbr>DeclBase.h (original)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+++ cfe/trunk/include/clang/AST/<wbr>DeclBase.h Wed Jan 31 16:28:36 2018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -836,6 +836,10 @@ public:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> void setLexicalDeclContext(<wbr>DeclContext *DC);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ /// Determine whether this declaration is a templated entity (whether it is<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ // within the scope of a template parameter).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ bool isTemplated() const;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> /// isDefinedOutsideFunctionOrMeth<wbr>od - This predicate returns true if this<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> /// scoped decl is defined outside the current function or method. This is<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> /// roughly global variables and functions, but also handles enums (which<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified: cfe/trunk/lib/AST/DeclBase.cpp<u></u><u></u></p>
</div>
</span><div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_AST_DeclBase.cpp-3Frev-3D323935-26r1-3D323934-26r2-3D323935-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=3WgES9JYNm2mJaPKUnRnaFndAGpGnj0AJ9kR5ARgxao&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject_cfe_<wbr>trunk_lib_AST_DeclBase.cpp-<wbr>3Frev-3D323935-26r1-3D323934-<wbr>26r2-3D323935-26view-3Ddiff&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>3WgES9JYNm2mJaPKUnRnaFndAGpGnj<wbr>0AJ9kR5ARgxao&e=</a><u></u><u></u></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal" style="margin-left:.5in">==============================<wbr>==============================<wbr>==================<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">--- cfe/trunk/lib/AST/DeclBase.cpp (original)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+++ cfe/trunk/lib/AST/DeclBase.cpp Wed Jan 31 16:28:36 2018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -236,10 +236,23 @@ TemplateDecl *Decl::getDescribedTemplate<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return RD->getDescribedClassTemplate(<wbr>);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> else if (auto *VD = dyn_cast<VarDecl>(this))<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return VD->getDescribedVarTemplate();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ else if (auto *AD = dyn_cast<TypeAliasDecl>(this))<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ return AD->getDescribedAliasTemplate(<wbr>);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return nullptr;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+bool Decl::isTemplated() const {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ // A declaration is dependent if it is a template or a template pattern, or<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ // is within (lexcially for a friend, semantically otherwise) a dependent<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ // context.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ // FIXME: Should local extern declarations be treated like friends?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ if (auto *AsDC = dyn_cast<DeclContext>(this))<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ return AsDC->isDependentContext();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ auto *DC = getFriendObjectKind() ? getLexicalDeclContext() : getDeclContext();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ return DC->isDependentContext() || isTemplateDecl() || getDescribedTemplate();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">const DeclContext *Decl::<wbr>getParentFunctionOrMethod() const {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> for (const DeclContext *DC = getDeclContext();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> DC && !DC->isTranslationUnit() && !DC->isNamespace();
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Modified: cfe/trunk/lib/CodeGen/<wbr>CodeGenModule.cpp<u></u><u></u></p>
</div>
</div></div><div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_lib_CodeGen_CodeGenModule.cpp-3Frev-3D323935-26r1-3D323934-26r2-3D323935-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=h8Z9xGHMAkSO6Ph5TtmYjbR5XdFVkIgGMgUXGk2oMqc&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject_cfe_<wbr>trunk_lib_CodeGen_<wbr>CodeGenModule.cpp-3Frev-<wbr>3D323935-26r1-3D323934-26r2-<wbr>3D323935-26view-3Ddiff&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>h8Z9xGHMAkSO6Ph5TtmYjbR5XdFVkI<wbr>gGMgUXGk2oMqc&e=</a><u></u><u></u></p>
</div><div><div class="h5">
<div>
<p class="MsoNormal" style="margin-left:.5in">==============================<wbr>==============================<wbr>==================<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">--- cfe/trunk/lib/CodeGen/<wbr>CodeGenModule.cpp (original)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+++ cfe/trunk/lib/CodeGen/<wbr>CodeGenModule.cpp Wed Jan 31 16:28:36 2018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -4190,18 +4190,13 @@ void CodeGenModule::<wbr>EmitDeclContext(cons<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">/// EmitTopLevelDecl - Emit code for a single top level declaration.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">void CodeGenModule::<wbr>EmitTopLevelDecl(Decl *D) {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> // Ignore dependent declarations.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- if (D->getDeclContext() && D->getDeclContext()-><wbr>isDependentContext())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ if (D->isTemplated())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> switch (D->getKind()) {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::CXXConversion:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::CXXMethod:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::Function:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- // Skip function templates<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- if (cast<FunctionDecl>(D)-><wbr>getDescribedFunctionTemplate() ||<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- cast<FunctionDecl>(D)<wbr>->isLateTemplateParsed())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">-<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> EmitGlobal(cast<FunctionDecl>(<wbr>D));<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> // Always provide some coverage mapping<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> // even for the functions that aren't emitted.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -4214,10 +4209,6 @@ void CodeGenModule::<wbr>EmitTopLevelDecl(Dec<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::Var:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::Decomposition:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- // Skip variable templates<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- if (cast<VarDecl>(D)-><wbr>getDescribedVarTemplate())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- LLVM_FALLTHROUGH;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::<wbr>VarTemplateSpecialization:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> EmitGlobal(cast<VarDecl>(D));<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> if (auto *DD = dyn_cast<DecompositionDecl>(D)<wbr>)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -4276,16 +4267,9 @@ void CodeGenModule::<wbr>EmitTopLevelDecl(Dec<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> DI->EmitUsingDirective(cast<<wbr>UsingDirectiveDecl>(*D));<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::CXXConstructor:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- // Skip function templates<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- if (cast<FunctionDecl>(D)-><wbr>getDescribedFunctionTemplate() ||<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- cast<FunctionDecl>(D)<wbr>->isLateTemplateParsed())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">-<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> getCXXABI().<wbr>EmitCXXConstructors(cast<<wbr>CXXConstructorDecl>(D));<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> break;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> case Decl::CXXDestructor:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- if (cast<FunctionDecl>(D)-><wbr>isLateTemplateParsed())<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">- return;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> getCXXABI().<wbr>EmitCXXDestructors(cast<<wbr>CXXDestructorDecl>(D));<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> break;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Added: cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-emit-dependent.<wbr>cpp<u></u><u></u></p>
</div>
</div></div><div>
<p class="MsoNormal" style="margin-left:.5in">URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_cfe_trunk_test_CodeGenCXX_microsoft-2Dabi-2Demit-2Ddependent.cpp-3Frev-3D323935-26view-3Dauto&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=mAm9nqXVQhIgVg8KPFJg-dzCh8yKufwWzfiUNbPDk-Q&e=" target="_blank">
https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject_cfe_<wbr>trunk_test_CodeGenCXX_<wbr>microsoft-2Dabi-2Demit-<wbr>2Ddependent.cpp-3Frev-<wbr>3D323935-26view-3Dauto&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>mAm9nqXVQhIgVg8KPFJg-<wbr>dzCh8yKufwWzfiUNbPDk-Q&e=</a><u></u><u></u></p>
</div><span class="">
<div>
<p class="MsoNormal" style="margin-left:.5in">==============================<wbr>==============================<wbr>==================<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">--- cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-emit-dependent.<wbr>cpp (added)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+++ cfe/trunk/test/CodeGenCXX/<wbr>microsoft-abi-emit-dependent.<wbr>cpp Wed Jan 31 16:28:36 2018<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">@@ -0,0 +1,11 @@<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+// RUN: %clang_cc1 -emit-llvm-only -fmodules -triple x86_64-windows %s<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+// PR36181<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+#pragma clang module build foo<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+module foo {}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+#pragma clang module contents<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+template <typename T> struct A {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+ friend void f(A<T>) {}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+};<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+#pragma clang module endbuild<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+#pragma clang module import foo<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">+void g() { f(A<int>()); }<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">______________________________<wbr>_________________<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">cfe-commits mailing list<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><u></u><u></u></p>
</div>
</span><div>
<p class="MsoNormal" style="margin-left:.5in"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=lpLH9VUhmNJcmdOGGUS4JH7kl-0dHB_UbZJavDZFar8&s=DpwzUMYVSTyRYllZ8J2SVU1ikJcj5-_6D5qjr2dNSL0&e=" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__lists.<wbr>llvm.org_cgi-2Dbin_mailman_<wbr>listinfo_cfe-2Dcommits&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>lpLH9VUhmNJcmdOGGUS4JH7kl-<wbr>0dHB_UbZJavDZFar8&s=<wbr>DpwzUMYVSTyRYllZ8J2SVU1ikJcj5-<wbr>_6D5qjr2dNSL0&e=</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
</div>
</div>
<br>______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">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/<wbr>mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>