mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add the -enable-testing flag, and serialize it.
This flag indicates that internal APIs within the module should be made available to client code for testing purposes. Currently does nothing. Not ready for developer consumption yet, ergo a hidden frontend-only flag. Part of testability (rdar://problem/17732115) Swift SVN r26292
This commit is contained in:
@@ -401,6 +401,7 @@ void Serializer::writeBlockInfoBlock() {
|
||||
BLOCK_RECORD(options_block, SDK_PATH);
|
||||
BLOCK_RECORD(options_block, XCC);
|
||||
BLOCK_RECORD(options_block, IS_SIB);
|
||||
BLOCK_RECORD(options_block, IS_TESTABLE);
|
||||
|
||||
BLOCK(INPUT_BLOCK);
|
||||
BLOCK_RECORD(input_block, IMPORTED_MODULE);
|
||||
@@ -539,6 +540,11 @@ void Serializer::writeHeader(const SerializationOptions &options) {
|
||||
options_block::IsSIBLayout IsSIB(Out);
|
||||
IsSIB.emit(ScratchRecord, options.IsSIB);
|
||||
|
||||
if (M->isTestingEnabled()) {
|
||||
options_block::IsTestableLayout IsTestable(Out);
|
||||
IsTestable.emit(ScratchRecord);
|
||||
}
|
||||
|
||||
if (options.SerializeOptionsForDebugging) {
|
||||
options_block::SDKPathLayout SDKPath(Out);
|
||||
options_block::XCCLayout XCC(Out);
|
||||
|
||||
Reference in New Issue
Block a user