r284187 - Fix bogus assert breaking modules self-host.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 17 08:35:23 PDT 2016
Not worth/reasonable to have a test case?
On Thu, Oct 13, 2016 at 7:44 PM Richard Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: rsmith
> Date: Thu Oct 13 21:35:11 2016
> New Revision: 284187
>
> URL: http://llvm.org/viewvc/llvm-project?rev=284187&view=rev
> Log:
> Fix bogus assert breaking modules self-host.
>
> Modified:
> cfe/trunk/lib/AST/ASTContext.cpp
>
> Modified: cfe/trunk/lib/AST/ASTContext.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=284187&r1=284186&r2=284187&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/AST/ASTContext.cpp (original)
> +++ cfe/trunk/lib/AST/ASTContext.cpp Thu Oct 13 21:35:11 2016
> @@ -907,11 +907,13 @@ void ASTContext::mergeDefinitionIntoModu
> assert(Other->isFromASTFile() && "merge of non-imported decl not
> supported");
> assert(Def != Other && "merging definition into itself");
>
> - if (!getLangOpts().ModulesLocalVisibility && !Other->isHidden())
> + if (!Other->isHidden()) {
> Def->setHidden(false);
> - else
> - assert(Other->getImportedOwningModule() &&
> - "hidden, imported declaration has no owning module");
> + return;
> + }
> +
> + assert(Other->getImportedOwningModule() &&
> + "hidden, imported declaration has no owning module");
>
> // Mark Def as the canonical definition of merged definition Other.
> {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161017/8c4b40b1/attachment.html>
More information about the cfe-commits
mailing list