Commit Graph

9 Commits

Author SHA1 Message Date
Benjamin Kramer 76d791457d Revert "Reinstate r281429, reverted in r281452, with a fix for its mishandling of"
This reverts commit r284176. It still marks some modules as invisible
that should be visible. Will follow up with the author with a test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 13:00:44 +00:00
Richard Smith 7fd299613f Reinstate r281429, reverted in r281452, with a fix for its mishandling of
compiles without -fmodules-local-submodule-visibility. Original commit message:

[modules] When merging one definition into another, propagate the list of
re-exporting modules from the discarded definition to the retained definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-13 23:04:14 +00:00
Eric Liu b19f8fa732 Revert "[modules] When merging one definition into another, propagate the list of re-exporting modules from the discarded definition to the retained definition."
This reverts commit r281429.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 10:05:10 +00:00
Richard Smith 1e75676d84 [modules] When merging one definition into another, propagate the list of
re-exporting modules from the discarded definition to the retained definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281429 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 01:05:35 +00:00
Richard Smith ba637c42b6 [modules] When we merge two definitions of a function, mark the retained
definition as visible in the discarded definition's module, as we do for
other kinds of definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-12 21:06:40 +00:00
Richard Smith 584334cb10 Fix regression introduced by r279164: only pass definitions as the PatternDef
to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly
determine whether a function definition is visible, and mark both the function
and the template as visible when merging function template definitions to
provide hasVisibleDefinition with the relevant information.

The change to always pass the right declaration as the PatternDef to
DiagnoseUninstantiableTemplate also caused those checks to happen before other
diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the
same situations, so I sunk the relevant diagnostics into
DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes
in reviews.llvm.org/D23492 by Vassil Vassilev.


This reinstates r279486, reverted in r279500, with a fix to
DiagnoseUninstantiableTemplate to only mark uninstantiable explicit
instantiation declarations as invalid if we actually diagnosed them. (When we
trigger an explicit instantiation of a class member from an explicit
instantiation declaration for the class, it's OK if there is no corresponding
definition and we certainly don't want to mark the member invalid in that
case.) This previously caused a build failure during bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279557 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 19:41:39 +00:00
Chandler Carruth 36fa4bbf3f Revert r279486 "Fix regression introduced by r279164"
Build bots seem unhappy and as Richard was leaving he asked me to revert
this for him. Doing so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-23 02:00:51 +00:00
Richard Smith e7c9a6c34c Fix regression introduced by r279164: only pass definitions as the PatternDef
to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly
determine whether a function definition is visible, and mark both the function
and the template as visible when merging function template definitions to
provide hasVisibleDefinition with the relevant information.

The change to always pass the right declaration as the PatternDef to
DiagnoseUninstantiableTemplate also caused those checks to happen before other
diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the
same situations, so I sunk the relevant diagnostics into
DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes
in reviews.llvm.org/D23492 by Vassil Vassilev.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-22 22:25:03 +00:00
Richard Smith fa1f36419e [modules] When determining the visible module set during template
instantiation, use the set of modules visible from the template definition, not
from whichever declaration the specialization was instantiated from.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241662 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-08 02:22:15 +00:00