mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add -disable-sil-linking to sil-function-extractor and enable it by default.
Requested by @gottesmm
This commit is contained in:
@@ -116,6 +116,11 @@ static llvm::cl::opt<bool> AssumeUnqualifiedOwnershipWhenParsing(
|
||||
llvm::cl::init(false),
|
||||
llvm::cl::desc("Assume all parsed functions have unqualified ownership"));
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
DisableSILLinking("disable-sil-linking",
|
||||
llvm::cl::init(true),
|
||||
llvm::cl::desc("Disable SIL linking"));
|
||||
|
||||
// This function isn't referenced outside its translation unit, but it
|
||||
// can't use the "static" keyword because its address is used for
|
||||
// getMainExecutable (since some platforms don't support taking the
|
||||
@@ -303,7 +308,7 @@ int main(int argc, char **argv) {
|
||||
std::unique_ptr<SerializedSILLoader> SL = SerializedSILLoader::create(
|
||||
CI.getASTContext(), CI.getSILModule(), nullptr);
|
||||
|
||||
if (extendedInfo.isSIB())
|
||||
if (extendedInfo.isSIB() || DisableSILLinking)
|
||||
SL->getAllForModule(CI.getMainModule()->getName(), nullptr);
|
||||
else
|
||||
SL->getAll();
|
||||
|
||||
Reference in New Issue
Block a user