File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 4
4
#include " swift/SIL/SILModule.h"
5
5
#include " swift/SIL/SILVisitor.h"
6
6
#include " swift/Serialization/ModuleSummary.h"
7
+ #include " llvm/Support/CommandLine.h"
7
8
#include " llvm/Support/MD5.h"
8
9
#include " llvm/Support/raw_ostream.h"
9
10
10
11
#define DEBUG_TYPE " module-summary-index"
11
12
13
+ static llvm::cl::opt<bool > EagerElimination (
14
+ " module-summary-eager-elim" , llvm::cl::init(false ),
15
+ llvm::cl::desc(
16
+ " Enable eager elimination which doesn't support debug print" ));
17
+
12
18
using namespace swift ;
13
19
using namespace modulesummary ;
14
20
@@ -302,6 +308,12 @@ void FunctionSummaryIndexer::visitKeyPathInst(KeyPathInst *KPI) {
302
308
}
303
309
304
310
bool shouldPreserveFunction (const SILFunction &F) {
311
+ if (EagerElimination &&
312
+ (F.getName ().equals (" swift_unexpectedError" ) ||
313
+ F.getName ().equals (" swift_errorInMain" ) ||
314
+ F.getName ().equals (" $ss23_getErrorDomainNSStringyyXlSPyxGs0B0RzlF" ))) {
315
+ return false ;
316
+ }
305
317
if (F.getName ().equals (SWIFT_ENTRY_POINT_FUNCTION)) {
306
318
return true ;
307
319
}
You can’t perform that action at this time.
0 commit comments