Files
swift-mirror/include/swift/Serialization/SerializedSILLoader.h
Manman Ren b78939e748 SIL Serialization: handle partial_apply.
Add command line argument -sil-link-all and -sil-serialize-all for testing
purpose.

Do not create new SILFunction for de-serialized SIL, instead update the
existing declaration with the de-serialized SILFunction.

Add testing case to cover partial_apply.


Swift SVN r8410
2013-09-18 18:51:04 +00:00

48 lines
1.5 KiB
C++

//===--- SerializedSILLoader.h - Handle SIL section in modules --*- c++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_SERIALIZATION_SILLOADER_H
#define SWIFT_SERIALIZATION_SILLOADER_H
namespace swift {
class ASTContext;
class SILDeserializer;
class SILFunction;
class SILModule;
/// Maintains a list of SILDeserializer, one for each serialized modules
/// in ASTContext. It provides lookupSILFunction that will perform lookup
/// on each SILDeserializer.
class SerializedSILLoader {
private:
std::vector<std::unique_ptr<SILDeserializer> > LoadedSILSections;
explicit SerializedSILLoader(ASTContext &ctx, SILModule *SILMod);
public:
static SerializedSILLoader *create(ASTContext &ctx, SILModule *SILMod) {
return new SerializedSILLoader(ctx, SILMod);
}
SILFunction *lookupSILFunction(SILFunction *Callee);
~SerializedSILLoader();
SerializedSILLoader(const SerializedSILLoader &) = delete;
SerializedSILLoader(SerializedSILLoader &&) = delete;
SerializedSILLoader &operator=(const SerializedSILLoader &) = delete;
SerializedSILLoader &operator=(SerializedSILLoader &&) = delete;
};
} // end namespace swift
#endif