IRGen: Implement lowering of has_symbol SIL instruction.

This commit is contained in:
Allan Shortlidge
2022-11-15 18:54:26 -08:00
parent abdc4d9112
commit ae32b8e148
7 changed files with 140 additions and 101 deletions

View File

@@ -315,9 +315,6 @@ private:
/// This is the set of undef values we've created, for uniquing purposes.
llvm::DenseMap<SILType, SILUndef *> UndefValues;
/// The list of decls that require query functions for #_hasSymbol conditions.
llvm::SetVector<ValueDecl *> hasSymbolDecls;
llvm::DenseMap<std::pair<Decl *, VarDecl *>, unsigned> fieldIndices;
llvm::DenseMap<EnumElementDecl *, unsigned> enumCaseIndices;
@@ -703,12 +700,6 @@ public:
return externallyVisible.count(decl) != 0;
}
void addHasSymbolDecl(ValueDecl *decl) { hasSymbolDecls.insert(decl); }
ArrayRef<ValueDecl *> getHasSymbolDecls() {
return hasSymbolDecls.getArrayRef();
}
using sil_global_iterator = GlobalListType::iterator;
using sil_global_const_iterator = GlobalListType::const_iterator;
GlobalListType &getSILGlobalList() { return silGlobals; }