[ownership] Change SILUndef to return Any ownership for trivial values and owned for non-trivial values.

This is in preparation for verifying that when ownership verification is enabled
that only enums and trivial values can have any ownership. I am doing this in
preparation for eliminating ValueOwnershipKind::Trivial.

rdar://46294760
This commit is contained in:
Michael Gottesman
2018-11-26 16:39:22 -08:00
parent 83c4266e18
commit c9bb5161a1
16 changed files with 64 additions and 39 deletions

View File

@@ -30,14 +30,6 @@
using namespace swift;
SILUndef *SILUndef::get(SILType ty, SILModule &m) {
// Unique these.
SILUndef *&entry = m.UndefValues[ty];
if (entry == nullptr)
entry = new (m) SILUndef(ty);
return entry;
}
FormalLinkage swift::getDeclLinkage(const ValueDecl *D) {
const DeclContext *fileContext = D->getDeclContext()->getModuleScopeContext();