mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Embedded] Introduce DeferredCodeGen feature.
Introduce an experimental feature DeferredCodeGen, that defers the generation of LLVM IR (and therefore object code) for all entities within an Embedded Swift module unless they have explicitly requested to not be emitted into the client (e.g., with `@_neverEmitIntoClient`). This feature is meant to generalize and subsume -emit-empty-object-file, relying on lazy emission of entities rather than abruptly ending the compilation pipeline before emitting any IR. Part of rdar://158363967.
This commit is contained in:
@@ -818,7 +818,7 @@ public:
|
||||
Bits.ModuleDecl.IsConcurrencyChecked = value;
|
||||
}
|
||||
|
||||
/// Whether this module has enable strict memory safety checking.
|
||||
/// Whether this module has enabled strict memory safety checking.
|
||||
bool strictMemorySafety() const {
|
||||
return Bits.ModuleDecl.StrictMemorySafety;
|
||||
}
|
||||
@@ -827,6 +827,15 @@ public:
|
||||
Bits.ModuleDecl.StrictMemorySafety = value;
|
||||
}
|
||||
|
||||
/// Whether this module uses deferred code generation.
|
||||
bool deferredCodeGen() const {
|
||||
return Bits.ModuleDecl.DeferredCodeGen;
|
||||
}
|
||||
|
||||
void setDeferredCodeGen(bool value = true) {
|
||||
Bits.ModuleDecl.DeferredCodeGen = value;
|
||||
}
|
||||
|
||||
bool isObjCNameLookupCachePopulated() const {
|
||||
return Bits.ModuleDecl.ObjCNameLookupCachePopulated;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user